2000
How can I change the visual appearance of the filter bar's close button (solid)

// AddItem event - Occurs after a new Item has been inserted to Items collection.
procedure TForm1.G2antt1AddItem(ASender: TObject; Item : HITEM);
begin
	with G2antt1 do
	begin
		Items.AddBar(Item,'Task','12/4/2017','12/14/2017',Null,Null);
	end
end;

with G2antt1 do
begin
	BeginUpdate();
	with Chart do
	begin
		LevelCount := 2;
		FirstVisibleDate := '12/2/2017';
		PaneWidth[False] := 256;
	end;
	(IUnknown(Columns.Add('Item')) as EXG2ANTTLib_TLB.Column).DisplayFilterButton := True;
	with (IUnknown(Columns.Add('Pos')) as EXG2ANTTLib_TLB.Column) do
	begin
		AllowSizing := False;
		AllowSort := False;
		Width := 32;
		FormatColumn := '1 apos ``';
		Position := 0;
	end;
	with Items do
	begin
		AddItem('Item A');
		AddItem('Item B');
		AddItem('Item C');
	end;
	FilterBarPromptVisible := EXG2ANTTLib_TLB.exFilterBarPromptVisible;
	Background[EXG2ANTTLib_TLB.exFooterFilterBarButton] := $ff;
	EndUpdate();
end
1999
Is it possible to prevent definitely showing the filter bar's close button

// AddItem event - Occurs after a new Item has been inserted to Items collection.
procedure TForm1.G2antt1AddItem(ASender: TObject; Item : HITEM);
begin
	with G2antt1 do
	begin
		Items.AddBar(Item,'Task','12/4/2017','12/14/2017',Null,Null);
	end
end;

with G2antt1 do
begin
	BeginUpdate();
	with Chart do
	begin
		LevelCount := 2;
		FirstVisibleDate := '12/2/2017';
		PaneWidth[False] := 256;
	end;
	(IUnknown(Columns.Add('Item')) as EXG2ANTTLib_TLB.Column).DisplayFilterButton := True;
	with (IUnknown(Columns.Add('Pos')) as EXG2ANTTLib_TLB.Column) do
	begin
		AllowSizing := False;
		AllowSort := False;
		Width := 32;
		FormatColumn := '1 apos ``';
		Position := 0;
	end;
	with Items do
	begin
		AddItem('Item A');
		AddItem('Item B');
		AddItem('Item C');
	end;
	FilterBarPromptVisible := EXG2ANTTLib_TLB.exFilterBarPromptVisible;
	Background[EXG2ANTTLib_TLB.exFooterFilterBarButton] := $ffffffff;
	EndUpdate();
end
1998
Is it possible to show the close button only if there is a filter applied

// AddItem event - Occurs after a new Item has been inserted to Items collection.
procedure TForm1.G2antt1AddItem(ASender: TObject; Item : HITEM);
begin
	with G2antt1 do
	begin
		Items.AddBar(Item,'Task','12/4/2017','12/14/2017',Null,Null);
	end
end;

with G2antt1 do
begin
	BeginUpdate();
	with Chart do
	begin
		LevelCount := 2;
		FirstVisibleDate := '12/2/2017';
		PaneWidth[False] := 256;
	end;
	(IUnknown(Columns.Add('Item')) as EXG2ANTTLib_TLB.Column).DisplayFilterButton := True;
	with (IUnknown(Columns.Add('Pos')) as EXG2ANTTLib_TLB.Column) do
	begin
		AllowSizing := False;
		AllowSort := False;
		Width := 32;
		FormatColumn := '1 apos ``';
		Position := 0;
	end;
	with Items do
	begin
		AddItem('Item A');
		AddItem('Item B');
		AddItem('Item C');
	end;
	FilterBarPromptVisible := Integer(EXG2ANTTLib_TLB.exFilterBarShowCloseIfRequired) Or Integer(EXG2ANTTLib_TLB.exFilterBarPromptVisible);
	EndUpdate();
end
1997
The control's filter bar is not closed once I click the close button (toggle)

// AddItem event - Occurs after a new Item has been inserted to Items collection.
procedure TForm1.G2antt1AddItem(ASender: TObject; Item : HITEM);
begin
	with G2antt1 do
	begin
		Items.AddBar(Item,'Task','12/4/2017','12/14/2017',Null,Null);
	end
end;

with G2antt1 do
begin
	BeginUpdate();
	with Chart do
	begin
		LevelCount := 2;
		FirstVisibleDate := '12/2/2017';
		PaneWidth[False] := 256;
	end;
	(IUnknown(Columns.Add('Item')) as EXG2ANTTLib_TLB.Column).DisplayFilterButton := True;
	with (IUnknown(Columns.Add('Pos')) as EXG2ANTTLib_TLB.Column) do
	begin
		AllowSizing := False;
		AllowSort := False;
		Width := 32;
		FormatColumn := '1 apos ``';
		Position := 0;
	end;
	with Items do
	begin
		AddItem('Item A');
		AddItem('Item B');
		AddItem('Item C');
		LockedItemCount[EXG2ANTTLib_TLB.exBottom] := 1;
		h := LockedItem[EXG2ANTTLib_TLB.exBottom,0];
		ItemDivider[h] := 0;
		CellValue[OleVariant(h),OleVariant(0)] := '<c><fgcolor=808080>Press the CTRL + F to turn on/off the control''s filter bar. ALT + Up/Down moves the focus.';
		CellValueFormat[OleVariant(h),OleVariant(0)] := EXG2ANTTLib_TLB.exHTML;
	end;
	FilterBarCaption := '`<r><fgcolor=808080>` + value';
	FilterBarPromptPattern := 'B';
	FilterBarPromptVisible := Integer(EXG2ANTTLib_TLB.exFilterBarCompact) Or Integer(EXG2ANTTLib_TLB.exFilterBarToggle) Or Integer(EXG2ANTTLib_TLB.exFilterBarSingleLine) Or Integer(EXG2ANTTLib_TLB.exFilterBarVisible) Or Integer(EXG2ANTTLib_TLB.exFilterBarPromptVisible);
	with Columns.Item[OleVariant(0)] do
	begin
		FilterType := EXG2ANTTLib_TLB.exFilter;
		Filter := 'Item B';
	end;
	ApplyFilter();
	EndUpdate();
end
1996
How can I display the control's filter on a single line

// AddItem event - Occurs after a new Item has been inserted to Items collection.
procedure TForm1.G2antt1AddItem(ASender: TObject; Item : HITEM);
begin
	with G2antt1 do
	begin
		Items.AddBar(Item,'Task','12/4/2017','12/14/2017',Null,Null);
	end
end;

with G2antt1 do
begin
	BeginUpdate();
	with Chart do
	begin
		LevelCount := 2;
		FirstVisibleDate := '12/2/2017';
		PaneWidth[False] := 256;
	end;
	(IUnknown(Columns.Add('Item')) as EXG2ANTTLib_TLB.Column).DisplayFilterButton := True;
	with (IUnknown(Columns.Add('Pos')) as EXG2ANTTLib_TLB.Column) do
	begin
		AllowSizing := False;
		AllowSort := False;
		Width := 32;
		FormatColumn := '1 apos ``';
		Position := 0;
	end;
	with Items do
	begin
		AddItem('Item A');
		AddItem('Item B');
		AddItem('Item C');
	end;
	FilterBarCaption := 'len(value) ? `filter for: <fgcolor 808080>` + value  : `<fgcolor 808080>no filter`';
	FilterBarPromptVisible := Integer(EXG2ANTTLib_TLB.exFilterBarSingleLine) Or Integer(EXG2ANTTLib_TLB.exFilterBarVisible);
	with Columns.Item[OleVariant(0)] do
	begin
		FilterType := EXG2ANTTLib_TLB.exFilter;
		Filter := 'Item A|Item B';
	end;
	ApplyFilter();
	EndUpdate();
end
1995
How can I display the control's filter on a single line (prompt-combined)

// AddItem event - Occurs after a new Item has been inserted to Items collection.
procedure TForm1.G2antt1AddItem(ASender: TObject; Item : HITEM);
begin
	with G2antt1 do
	begin
		Items.AddBar(Item,'Task','12/4/2017','12/14/2017',Null,Null);
	end
end;

with G2antt1 do
begin
	BeginUpdate();
	with Chart do
	begin
		LevelCount := 2;
		FirstVisibleDate := '12/2/2017';
		PaneWidth[False] := 256;
	end;
	(IUnknown(Columns.Add('Item')) as EXG2ANTTLib_TLB.Column).DisplayFilterButton := True;
	with (IUnknown(Columns.Add('Pos')) as EXG2ANTTLib_TLB.Column) do
	begin
		AllowSizing := False;
		AllowSort := False;
		Width := 32;
		FormatColumn := '1 apos ``';
		Position := 0;
	end;
	with Items do
	begin
		AddItem('Item A');
		AddItem('Item B');
		AddItem('Item C');
	end;
	FilterBarCaption := '`<r>` + value';
	FilterBarPromptVisible := Integer(EXG2ANTTLib_TLB.exFilterBarCompact) Or Integer(EXG2ANTTLib_TLB.exFilterBarSingleLine) Or Integer(EXG2ANTTLib_TLB.exFilterBarVisible) Or Integer(EXG2ANTTLib_TLB.exFilterBarPromptVisible);
	with Columns.Item[OleVariant(0)] do
	begin
		FilterType := EXG2ANTTLib_TLB.exFilter;
		Filter := 'Item A|Item B';
	end;
	ApplyFilter();
	EndUpdate();
end
1994
How can I get the number of results after a filter is applied

// AddItem event - Occurs after a new Item has been inserted to Items collection.
procedure TForm1.G2antt1AddItem(ASender: TObject; Item : HITEM);
begin
	with G2antt1 do
	begin
		Items.AddBar(Item,'Task','12/4/2017','12/14/2017',Null,Null);
	end
end;

// Click event - Occurs when the user presses and then releases the left mouse button over the tree control.
procedure TForm1.G2antt1Click(ASender: TObject; );
begin
	with G2antt1 do
	begin
		ClearFilter();
	end
end;

// FilterChange event - Occurs when the filter was changed.
procedure TForm1.G2antt1FilterChange(ASender: TObject; );
begin
	with G2antt1 do
	begin
		OutputDebugString( 'Items.MatchItemCount' );
		OutputDebugString( Items.MatchItemCount );
		OutputDebugString( FormatABC('value < 0 ? `filter applied: ` + abs(value + 1) + ` result(s)` : `no filter`',Items.MatchItemCount,Null,Null) );
	end
end;

with G2antt1 do
begin
	BeginUpdate();
	with Chart do
	begin
		LevelCount := 2;
		FirstVisibleDate := '12/2/2017';
		PaneWidth[False] := 256;
	end;
	(IUnknown(Columns.Add('Item')) as EXG2ANTTLib_TLB.Column).DisplayFilterButton := True;
	with (IUnknown(Columns.Add('Pos')) as EXG2ANTTLib_TLB.Column) do
	begin
		AllowSizing := False;
		AllowSort := False;
		Width := 32;
		FormatColumn := '1 apos ``';
		Position := 0;
	end;
	with Items do
	begin
		AddItem('Item A');
		AddItem('Item B');
		AddItem('Item C');
	end;
	FilterBarPromptVisible := EXG2ANTTLib_TLB.exFilterBarPromptVisible;
	FilterBarPromptPattern := 'Item';
	EndUpdate();
end
1993
How can I programmatically clear the control's filter
// AddItem event - Occurs after a new Item has been inserted to Items collection.
procedure TForm1.G2antt1AddItem(ASender: TObject; Item : HITEM);
begin
	with G2antt1 do
	begin
		Items.AddBar(Item,'Task','12/4/2017','12/14/2017',Null,Null);
	end
end;

// Click event - Occurs when the user presses and then releases the left mouse button over the tree control.
procedure TForm1.G2antt1Click(ASender: TObject; );
begin
	with G2antt1 do
	begin
		ClearFilter();
	end
end;

with G2antt1 do
begin
	BeginUpdate();
	with Chart do
	begin
		LevelCount := 2;
		FirstVisibleDate := '12/2/2017';
		PaneWidth[False] := 256;
	end;
	(IUnknown(Columns.Add('Item')) as EXG2ANTTLib_TLB.Column).DisplayFilterButton := True;
	with (IUnknown(Columns.Add('Pos')) as EXG2ANTTLib_TLB.Column) do
	begin
		AllowSizing := False;
		AllowSort := False;
		Width := 32;
		FormatColumn := '1 apos ``';
		Position := 0;
	end;
	with Items do
	begin
		AddItem('Item A');
		AddItem('Item B');
		AddItem('Item C');
	end;
	FilterBarPromptVisible := EXG2ANTTLib_TLB.exFilterBarPromptVisible;
	FilterBarPromptPattern := 'B';
	EndUpdate();
end
1992
Is it possible to prevent closing the control's filter bar, so it is always shown (prompt-combined)

// AddItem event - Occurs after a new Item has been inserted to Items collection.
procedure TForm1.G2antt1AddItem(ASender: TObject; Item : HITEM);
begin
	with G2antt1 do
	begin
		Items.AddBar(Item,'Task','12/4/2017','12/14/2017',Null,Null);
	end
end;

with G2antt1 do
begin
	BeginUpdate();
	with Chart do
	begin
		LevelCount := 2;
		FirstVisibleDate := '12/2/2017';
		PaneWidth[False] := 256;
	end;
	(IUnknown(Columns.Add('Item')) as EXG2ANTTLib_TLB.Column).DisplayFilterButton := True;
	with (IUnknown(Columns.Add('Pos')) as EXG2ANTTLib_TLB.Column) do
	begin
		AllowSizing := False;
		AllowSort := False;
		Width := 32;
		FormatColumn := '1 apos ``';
		Position := 0;
	end;
	with Items do
	begin
		AddItem('Item A');
		AddItem('Item B');
		AddItem('Item C');
	end;
	FilterBarPromptPattern := 'B';
	FilterBarPromptVisible := Integer(EXG2ANTTLib_TLB.exFilterBarVisible) Or Integer(EXG2ANTTLib_TLB.exFilterBarPromptVisible);
	with Columns.Item[OleVariant(0)] do
	begin
		FilterType := EXG2ANTTLib_TLB.exFilter;
		Filter := 'Item B';
	end;
	ApplyFilter();
	EndUpdate();
end
1991
Is it possible to prevent closing the control's filter bar, so it is always shown (prompt)

// AddItem event - Occurs after a new Item has been inserted to Items collection.
procedure TForm1.G2antt1AddItem(ASender: TObject; Item : HITEM);
begin
	with G2antt1 do
	begin
		Items.AddBar(Item,'Task','12/4/2017','12/14/2017',Null,Null);
	end
end;

with G2antt1 do
begin
	BeginUpdate();
	with Chart do
	begin
		LevelCount := 2;
		FirstVisibleDate := '12/2/2017';
		PaneWidth[False] := 256;
	end;
	(IUnknown(Columns.Add('Item')) as EXG2ANTTLib_TLB.Column).DisplayFilterButton := True;
	with (IUnknown(Columns.Add('Pos')) as EXG2ANTTLib_TLB.Column) do
	begin
		AllowSizing := False;
		AllowSort := False;
		Width := 32;
		FormatColumn := '1 apos ``';
		Position := 0;
	end;
	with Items do
	begin
		AddItem('Item A');
		AddItem('Item B');
		AddItem('Item C');
	end;
	FilterBarPromptVisible := EXG2ANTTLib_TLB.exFilterBarPromptVisible;
	FilterBarPromptPattern := 'B';
	EndUpdate();
end
1990
Is it possible to prevent closing the control's filter bar, so it is always shown

// AddItem event - Occurs after a new Item has been inserted to Items collection.
procedure TForm1.G2antt1AddItem(ASender: TObject; Item : HITEM);
begin
	with G2antt1 do
	begin
		Items.AddBar(Item,'Task','12/4/2017','12/14/2017',Null,Null);
	end
end;

with G2antt1 do
begin
	BeginUpdate();
	with Chart do
	begin
		LevelCount := 2;
		FirstVisibleDate := '12/2/2017';
		PaneWidth[False] := 256;
	end;
	(IUnknown(Columns.Add('Item')) as EXG2ANTTLib_TLB.Column).DisplayFilterButton := True;
	with (IUnknown(Columns.Add('Pos')) as EXG2ANTTLib_TLB.Column) do
	begin
		AllowSizing := False;
		AllowSort := False;
		Width := 32;
		FormatColumn := '1 apos ``';
		Position := 0;
	end;
	with Items do
	begin
		AddItem('Item A');
		AddItem('Item B');
		AddItem('Item C');
	end;
	FilterBarCaption := 'len(value) = 0 ? `<fgcolor=808080>no filter` : value';
	FilterBarPromptVisible := EXG2ANTTLib_TLB.exFilterBarVisible;
	with Columns.Item[OleVariant(0)] do
	begin
		FilterType := EXG2ANTTLib_TLB.exFilter;
		Filter := 'Item B';
	end;
	ApplyFilter();
	EndUpdate();
end
1989
What are the options to align the percent caption

with G2antt1 do
begin
	BeginUpdate();
	Columns.Add('Clip');
	ScrollBySingleLine := True;
	DrawGridLines := EXG2ANTTLib_TLB.exRowLines;
	with Chart do
	begin
		AllowResizeChart := Integer(EXG2ANTTLib_TLB.exAllowResizeChartMiddle) Or Integer(EXG2ANTTLib_TLB.exAllowResizeChartHeader);
		DrawGridLines := EXG2ANTTLib_TLB.exRowLines;
		FirstVisibleDate := '12/26/2000';
		LevelCount := 2;
		PaneWidth[False] := 256;
		with Bars.Add('Task%Progress') do
		begin
			Shortcut := 'Task';
			Pattern := EXG2ANTTLib_TLB.exPatternBox;
			Color := $a4a4a4;
			StartColor := $f0f0f0;
			EndColor := StartColor;
			OverlaidType := Integer(EXG2ANTTLib_TLB.exOverlaidBarsIncludeCaption) Or Integer(EXG2ANTTLib_TLB.exOverlaidBarsStackAutoArrange) Or Integer(EXG2ANTTLib_TLB.exOverlaidBarsStack);
			Height := 15;
			Def[EXG2ANTTLib_TLB.exBarPercent] := OleVariant(0.5);
			Def[EXG2ANTTLib_TLB.exBarShowPercentCaption] := OleVariant(True);
			Def[EXG2ANTTLib_TLB.exBarPercentCaptionFormat] := '<sha ;;0>%p%';
		end;
	end;
	with Items do
	begin
		h := AddItem('no clip, (0-2)');
		AddBar(h,'Task','1/2/2001','1/4/2001','K1',Null);
		ItemBar[h,'K1',EXG2ANTTLib_TLB.exBarAlignPercentCaption] := OleVariant(2);
		AddBar(h,'Task','1/2/2001','1/4/2001','K2',Null);
		ItemBar[h,'K2',EXG2ANTTLib_TLB.exBarAlignPercentCaption] := OleVariant(1);
		AddBar(h,'Task','1/2/2001','1/4/2001','K3',Null);
		ItemBar[h,'K3',EXG2ANTTLib_TLB.exBarAlignPercentCaption] := OleVariant(0);
		h := AddItem('clip, inside (3-5)');
		AddBar(h,'Task','1/2/2001','1/4/2001','K1',Null);
		ItemBar[h,'K1',EXG2ANTTLib_TLB.exBarAlignPercentCaption] := OleVariant(5);
		AddBar(h,'Task','1/2/2001','1/4/2001','K2',Null);
		ItemBar[h,'K2',EXG2ANTTLib_TLB.exBarAlignPercentCaption] := OleVariant(4);
		AddBar(h,'Task','1/2/2001','1/4/2001','K3',Null);
		ItemBar[h,'K3',EXG2ANTTLib_TLB.exBarAlignPercentCaption] := OleVariant(3);
		h := AddItem('hide on min width, clip if not fit, inside (6-8)');
		AddBar(h,'Task','1/2/2001','1/4/2001','K1',Null);
		ItemBar[h,'K1',EXG2ANTTLib_TLB.exBarAlignPercentCaption] := OleVariant(8);
		AddBar(h,'Task','1/2/2001','1/4/2001','K2',Null);
		ItemBar[h,'K2',EXG2ANTTLib_TLB.exBarAlignPercentCaption] := OleVariant(7);
		AddBar(h,'Task','1/2/2001','1/4/2001','K3',Null);
		ItemBar[h,'K3',EXG2ANTTLib_TLB.exBarAlignPercentCaption] := OleVariant(6);
		h := AddItem('hide if not fit, no clip, inside (9-11)');
		AddBar(h,'Task','1/2/2001','1/4/2001','K1',Null);
		ItemBar[h,'K1',EXG2ANTTLib_TLB.exBarAlignPercentCaption] := OleVariant(11);
		AddBar(h,'Task','1/2/2001','1/4/2001','K2',Null);
		ItemBar[h,'K2',EXG2ANTTLib_TLB.exBarAlignPercentCaption] := OleVariant(10);
		AddBar(h,'Task','1/2/2001','1/4/2001','K3',Null);
		ItemBar[h,'K3',EXG2ANTTLib_TLB.exBarAlignPercentCaption] := OleVariant(9);
		h := AddItem('no clip, inside, outside (12-14)');
		AddBar(h,'Task','1/2/2001','1/4/2001','K1',Null);
		ItemBar[h,'K1',EXG2ANTTLib_TLB.exBarAlignPercentCaption] := OleVariant(14);
		AddBar(h,'Task','1/2/2001','1/4/2001','K2',Null);
		ItemBar[h,'K2',EXG2ANTTLib_TLB.exBarHAlignCaption] := OleVariant(13);
		AddBar(h,'Task','1/2/2001','1/4/2001','K3',Null);
		ItemBar[h,'K3',EXG2ANTTLib_TLB.exBarAlignPercentCaption] := OleVariant(12);
		h := AddItem('no clip, outside (16-18)');
		AddBar(h,'Task','1/2/2001','1/4/2001','K1',Null);
		ItemBar[h,'K1',EXG2ANTTLib_TLB.exBarAlignPercentCaption] := OleVariant(18);
		AddBar(h,'Task','1/2/2001','1/4/2001','K2',Null);
		ItemBar[h,'K2',EXG2ANTTLib_TLB.exBarAlignPercentCaption] := OleVariant(17);
		AddBar(h,'Task','1/2/2001','1/4/2001','K3',Null);
		ItemBar[h,'K3',EXG2ANTTLib_TLB.exBarAlignPercentCaption] := OleVariant(16);
	end;
	EndUpdate();
end
1988
Is it possible to determine whether a bar is in the current display area

// BarResizing event - Occurs when a bar is moving or resizing.
procedure TForm1.G2antt1BarResizing(ASender: TObject; Item : HITEM;Key : OleVariant);
begin
	with G2antt1 do
	begin
		Refresh();
	end
end;

// DateChange event - Occurs when the first visible date is changed.
procedure TForm1.G2antt1DateChange(ASender: TObject; );
begin
	with G2antt1 do
	begin
		Refresh();
	end
end;

// FormatColumn event - Fired when a cell requires to format its caption.
procedure TForm1.G2antt1FormatColumn(ASender: TObject; Item : HITEM;ColIndex : Integer;var Value : OleVariant);
begin
	with G2antt1 do
	begin
		s := Items.ItemBar[Item,'A',EXG2ANTTLib_TLB.exBarStart];
		e := Items.ItemBar[Item,'A',EXG2ANTTLib_TLB.exBarEnd];
		l := FormatABC('A < B',OleVariant(e),Chart.FirstVisibleDate,Null);
		r := FormatABC('A > B',OleVariant(s),Chart.DateFromPoint[1,-1],Null);
		Value := FormatABC('( A or B ) ? `<fgcolor=C0C0C0>hidden` : `<b>visible`',OleVariant(l),OleVariant(r),Null);
	end
end;

// LayoutChanged event - Occurs when column's position or column's size is changed.
procedure TForm1.G2antt1LayoutChanged(ASender: TObject; );
begin
	with G2antt1 do
	begin
		Refresh();
	end
end;

with G2antt1 do
begin
	BeginUpdate();
	SelBackMode := EXG2ANTTLib_TLB.exTransparent;
	Columns.Add('Tasks');
	with (IUnknown(Columns.Add('Visible')) as EXG2ANTTLib_TLB.Column) do
	begin
		FireFormatColumn := True;
		Def[EXG2ANTTLib_TLB.exCellValueFormat] := OleVariant(1);
	end;
	with Chart do
	begin
		OverviewVisible := EXG2ANTTLib_TLB.exOverviewShowAll;
		OverviewHeight := 64;
		FirstVisibleDate := '8/1/2017';
		LevelCount := 2;
		PaneWidth[False] := 128;
		SelBackColor := G2antt1.SelBackColor;
		SelBarColor := $808080;
	end;
	SelBackColor := BackColor;
	SelForeColor := ForeColor;
	with Items do
	begin
		AddBar(AddItem('Task 1'),'Task','8/2/2017','8/8/2017','A',Null);
		AddBar(AddItem('Task 2'),'Task','8/3/2018','8/10/2018','A',Null);
		AddBar(AddItem('Task 3'),'Task','8/4/2019','8/12/2019','A',Null);
		SelectItem[FocusItem] := True;
	end;
	EndUpdate();
end
1987
How can I ensure that the bar fits the control's client area

// SelectionChanged event - Fired after a new item has been selected.
procedure TForm1.G2antt1SelectionChanged(ASender: TObject; );
begin
	with G2antt1 do
	begin
		h := Items.FocusItem;
		k := Items.FirstItemBar[h];
		s := FormatABC('(A+B)/2',Items.ItemBar[h,OleVariant(k),EXG2ANTTLib_TLB.exBarStart],Items.ItemBar[h,OleVariant(k),EXG2ANTTLib_TLB.exBarEnd],Null);
		Chart.ScrollTo(s,OleVariant(1));
	end
end;

with G2antt1 do
begin
	BeginUpdate();
	SelBackMode := EXG2ANTTLib_TLB.exTransparent;
	Columns.Add('Tasks');
	with Chart do
	begin
		FirstVisibleDate := '8/1/2017';
		LevelCount := 2;
		PaneWidth[False] := 128;
		SelBackColor := G2antt1.SelBackColor;
		SelBarColor := $808080;
	end;
	with Items do
	begin
		AddBar(AddItem('Task 1'),'Task','8/2/2017','8/8/2017',Null,Null);
		AddBar(AddItem('Task 2'),'Task','8/3/2018','8/10/2018',Null,Null);
		AddBar(AddItem('Task 3'),'Task','8/4/2019','8/12/2019',Null,Null);
		SelectItem[FocusItem] := True;
	end;
	EndUpdate();
end
1986
Is it possible to change the caption from a column without to remove the column and add it with the new caption
with G2antt1 do
begin
	(IUnknown(Columns.Add('ColumnName')) as EXG2ANTTLib_TLB.Column).Caption := 'NewName';
	(IUnknown(Columns.Add('ColumnName')) as EXG2ANTTLib_TLB.Column).HTMLCaption := '<b>New</b>Name';
end
1985
How can I display the bar's duration in days, minutes, and so so on

with G2antt1 do
begin
	BeginUpdate();
	with Columns do
	begin
		(IUnknown(Add('Tasks')) as EXG2ANTTLib_TLB.Column).AllowSizing := False;
		with (IUnknown(Add('Duration')) as EXG2ANTTLib_TLB.Column) do
		begin
			Def[EXG2ANTTLib_TLB.exCellValueToItemBarProperty] := OleVariant(513);
			Def[EXG2ANTTLib_TLB.exCellValueToItemBarKey] := 'A';
			FormatColumn := 'trim((1:=int((0:=value)/365) ? =:1 + ` year(s) ` : ``)  + (1:=int((0:=(=:0 - (=:1*365)))/31) ? =:1 + ` month(s) ` : ``) + (1:=in' + 
	't((0:=(=:0 - (=:1*31)))/7) ? =:1 + ` week(s) ` : ``) + (1:=int((0:=(=:0 - (=:1*7)))/1) ? =:1 + ` day(s) ` : ``) + (1:=int((0:=(=' + 
	':0 - =:1 + 1/24/60/60/2))*24) ? =:1 + ` hour(s) ` : ``) + (1:=int((0:=(=:0*24 - =:1))*60) ? =:1 + ` min(s) ` : ``) + (1:=int((0:' + 
	'=(=:0*60 - =:1))*60) ? =:1 + ` sec(s)` : ``))';
		end;
	end;
	Items.AllowCellValueToItemBar := True;
	with Chart do
	begin
		FirstVisibleDate := '12/30/2001';
		LevelCount := 2;
		PaneWidth[False] := 196;
		Bars.Add('Task:Split').Shortcut := 'Task';
		OverviewVisible := EXG2ANTTLib_TLB.exOverviewShowAll;
		OverviewHeight := 64;
		ResizeUnitScale := EXG2ANTTLib_TLB.exSecond;
		AllowResizeChart := Integer(EXG2ANTTLib_TLB.exAllowChangeUnitScale) Or Integer(EXG2ANTTLib_TLB.exAllowResizeChartMiddle) Or Integer(EXG2ANTTLib_TLB.exAllowResizeChartHeader);
	end;
	with Items do
	begin
		h := AddItem('Task 1');
		AddBar(h,'Task','12/31/2001','1/7/2002','A',Null);
		h := AddItem('Task 2');
		AddBar(h,'Task','1/1/2002','2/14/2002','A',Null);
		h := AddItem('Task 3');
		AddBar(h,'Task','1/2/2002 10:00:00 AM','1/2/2002 12:00:00 PM','A',Null);
		h := AddItem('Task 4');
		AddBar(h,'Task','1/3/2002','1/4/2002 8:30:30 AM','A',Null);
	end;
	EndUpdate();
end
1984
How can I change the background color for checked items (EBN color, frame)

// CellStateChanged event - Fired after cell's state has been changed.
procedure TForm1.G2antt1CellStateChanged(ASender: TObject; Item : HITEM;ColIndex : Integer);
begin
	with G2antt1 do
	begin
		Refresh();
	end
end;

with G2antt1 do
begin
	BeginUpdate();
	LinesAtRoot := EXG2ANTTLib_TLB.exLinesAtRoot;
	SelBackMode := EXG2ANTTLib_TLB.exTransparent;
	DefaultItemHeight := 22;
	with (IUnknown(Columns.Add('Tasks')) as EXG2ANTTLib_TLB.Column) do
	begin
		Def[EXG2ANTTLib_TLB.exCellHasCheckBox] := OleVariant(True);
		PartialCheck := True;
	end;
	with VisualAppearance do
	begin
		Add(2,'gBFLBCJwBAEHhEJAAEhABUkIQAAYAQGKIcBiAKBQAGYBIJDEMQ3DjAUBjMK4ZwTC4AIQjCK4JDKHYJRpHEZgLBMJAAGIZYhhUYRUiYMkiJBGGDIDiGGI2SJAcbTVIEcx' + 
	'9EyUJSgSTJOjCMokTTIU4TTLYASbJafJJhWSaAiyMouDIOMg1BDNIw/Hika6jOgKUisNJXRzWIBTbDlOQ3JqnbCjOQRSrQBoNDAMAiiaKlbwJPK9RoieQXfwUAJrXJcF' + 
	'qXFSLVxNBKAQEBA=');
		Add(1,'CP:2 1 1 -1 -1');
	end;
	with ConditionalFormats.Add('%CS0 = 1',Null) do
	begin
		BackColor := $1000000;
		ChartBackColor := BackColor;
	end;
	HeaderVisible := EXG2ANTTLib_TLB.exHeaderVisibleExtendLevels;
	with Chart do
	begin
		FirstVisibleDate := '8/1/2017';
		LevelCount := 2;
		PaneWidth[False] := 128;
		with Bars.Item['Summary'] do
		begin
			StartShape := EXG2ANTTLib_TLB.exShapeIconEmpty;
			EndShape := EXG2ANTTLib_TLB.exShapeIconEmpty;
			Shape := EXG2ANTTLib_TLB.exShapeThinDown;
		end;
		SelBackColor := G2antt1.SelBackColor;
		SelBarColor := $808080;
	end;
	with Items do
	begin
		h := AddItem('Project');
		hChild := InsertItem(h,Null,'Task 1');
		AddBar(hChild,'Task','8/2/2017','8/8/2017',Null,Null);
		SelectItem[hChild] := True;
		hChild := InsertItem(h,Null,'Task 2');
		AddBar(hChild,'Task','8/3/2017','8/10/2017',Null,Null);
		CellState[OleVariant(hChild),OleVariant(0)] := 1;
		hChild := InsertItem(h,Null,'Task 3');
		AddBar(hChild,'Task','8/4/2017','8/12/2017',Null,Null);
		CellState[OleVariant(hChild),OleVariant(0)] := 1;
		AddBar(h,'Summary','8/1/2017','8/1/2017','sum',Null);
		DefineSummaryBars(h,'sum',-3,'');
		ExpandItem[h] := True;
	end;
	EndUpdate();
end
1983
How can I change the caption of the checked items (sample 2)

with G2antt1 do
begin
	BeginUpdate();
	LinesAtRoot := EXG2ANTTLib_TLB.exLinesAtRoot;
	SelBackColor := BackColor;
	SelForeColor := ForeColor;
	with (IUnknown(Columns.Add('Tasks')) as EXG2ANTTLib_TLB.Column) do
	begin
		Def[EXG2ANTTLib_TLB.exCellHasCheckBox] := OleVariant(True);
		PartialCheck := True;
		Def[EXG2ANTTLib_TLB.exCellValueFormat] := OleVariant(1);
		FormatColumn := '%CS0 = 1 ? `<bgcolor=000000><fgcolor=FFFFFF> ` + value + ` </fgcolor></bgcolor>` : value';
	end;
	HeaderVisible := EXG2ANTTLib_TLB.exHeaderVisibleExtendLevels;
	with Chart do
	begin
		FirstVisibleDate := '8/1/2017';
		LevelCount := 2;
		PaneWidth[False] := 256;
		with Bars.Item['Summary'] do
		begin
			StartShape := EXG2ANTTLib_TLB.exShapeIconEmpty;
			EndShape := EXG2ANTTLib_TLB.exShapeIconEmpty;
			Shape := EXG2ANTTLib_TLB.exShapeThinDown;
		end;
		SelBackColor := G2antt1.SelBackColor;
		SelBarColor := $808080;
	end;
	with Items do
	begin
		h := AddItem('Project');
		hChild := InsertItem(h,Null,'Task 1');
		AddBar(hChild,'Task','8/2/2017','8/8/2017',Null,Null);
		SelectItem[hChild] := True;
		hChild := InsertItem(h,Null,'Task 2');
		AddBar(hChild,'Task','8/3/2017','8/10/2017',Null,Null);
		CellState[OleVariant(hChild),OleVariant(0)] := 1;
		hChild := InsertItem(h,Null,'Task 3');
		AddBar(hChild,'Task','8/4/2017','8/12/2017',Null,Null);
		CellState[OleVariant(hChild),OleVariant(0)] := 1;
		AddBar(h,'Summary','8/1/2017','8/1/2017','sum',Null);
		DefineSummaryBars(h,'sum',-3,'');
		ExpandItem[h] := True;
	end;
	EndUpdate();
end
1982
How can I change the caption of the checked items (sample 1)

with G2antt1 do
begin
	BeginUpdate();
	LinesAtRoot := EXG2ANTTLib_TLB.exLinesAtRoot;
	with (IUnknown(Columns.Add('Tasks')) as EXG2ANTTLib_TLB.Column) do
	begin
		Def[EXG2ANTTLib_TLB.exCellHasCheckBox] := OleVariant(True);
		PartialCheck := True;
		Def[EXG2ANTTLib_TLB.exCellValueFormat] := OleVariant(1);
		FormatColumn := 'value + (%CS0 = 1 ? `<r><fgcolor=808080>(checked)` : ``)';
	end;
	HeaderVisible := EXG2ANTTLib_TLB.exHeaderVisibleExtendLevels;
	with Chart do
	begin
		FirstVisibleDate := '8/1/2017';
		LevelCount := 2;
		PaneWidth[False] := 256;
		with Bars.Item['Summary'] do
		begin
			StartShape := EXG2ANTTLib_TLB.exShapeIconEmpty;
			EndShape := EXG2ANTTLib_TLB.exShapeIconEmpty;
			Shape := EXG2ANTTLib_TLB.exShapeThinDown;
		end;
		SelBackColor := G2antt1.SelBackColor;
		SelBarColor := $808080;
	end;
	with Items do
	begin
		h := AddItem('Project');
		hChild := InsertItem(h,Null,'Task 1');
		AddBar(hChild,'Task','8/2/2017','8/8/2017',Null,Null);
		SelectItem[hChild] := True;
		hChild := InsertItem(h,Null,'Task 2');
		AddBar(hChild,'Task','8/3/2017','8/10/2017',Null,Null);
		CellState[OleVariant(hChild),OleVariant(0)] := 1;
		hChild := InsertItem(h,Null,'Task 3');
		AddBar(hChild,'Task','8/4/2017','8/12/2017',Null,Null);
		CellState[OleVariant(hChild),OleVariant(0)] := 1;
		AddBar(h,'Summary','8/1/2017','8/1/2017','sum',Null);
		DefineSummaryBars(h,'sum',-3,'');
		ExpandItem[h] := True;
	end;
	EndUpdate();
end
1981
How can I change the font for the checked items

// CellStateChanged event - Fired after cell's state has been changed.
procedure TForm1.G2antt1CellStateChanged(ASender: TObject; Item : HITEM;ColIndex : Integer);
begin
	with G2antt1 do
	begin
		Refresh();
	end
end;

with G2antt1 do
begin
	BeginUpdate();
	LinesAtRoot := EXG2ANTTLib_TLB.exLinesAtRoot;
	DefaultItemHeight := 22;
	with (IUnknown(Columns.Add('Tasks')) as EXG2ANTTLib_TLB.Column) do
	begin
		Def[EXG2ANTTLib_TLB.exCellHasCheckBox] := OleVariant(True);
		PartialCheck := True;
	end;
	with ConditionalFormats.Add('%CS0 = 1',Null) do
	begin
		f := (IUnknown(ComObj.CreateComObject(ComObj.ProgIDToClassID('StdFont'))) as stdole_TLB.StdFont);
		with f do
		begin
			Name := G2antt1.Font.Name;
			Size := 12;
		end;
		Font := (IUnknown(f) as stdole_TLB.StdFont);
	end;
	HeaderVisible := EXG2ANTTLib_TLB.exHeaderVisibleExtendLevels;
	with Chart do
	begin
		FirstVisibleDate := '8/1/2017';
		LevelCount := 2;
		PaneWidth[False] := 196;
		with Bars.Item['Summary'] do
		begin
			StartShape := EXG2ANTTLib_TLB.exShapeIconEmpty;
			EndShape := EXG2ANTTLib_TLB.exShapeIconEmpty;
			Shape := EXG2ANTTLib_TLB.exShapeThinDown;
		end;
		SelBackColor := G2antt1.SelBackColor;
		SelBarColor := $808080;
	end;
	with Items do
	begin
		h := AddItem('Project');
		hChild := InsertItem(h,Null,'Task 1');
		AddBar(hChild,'Task','8/2/2017','8/8/2017',Null,Null);
		SelectItem[hChild] := True;
		hChild := InsertItem(h,Null,'Task 2');
		AddBar(hChild,'Task','8/3/2017','8/10/2017',Null,Null);
		CellState[OleVariant(hChild),OleVariant(0)] := 1;
		hChild := InsertItem(h,Null,'Task 3');
		AddBar(hChild,'Task','8/4/2017','8/12/2017',Null,Null);
		CellState[OleVariant(hChild),OleVariant(0)] := 1;
		AddBar(h,'Summary','8/1/2017','8/1/2017','sum',Null);
		DefineSummaryBars(h,'sum',-3,'');
		ExpandItem[h] := True;
	end;
	EndUpdate();
end
1980
How can I bold the checked items

// CellStateChanged event - Fired after cell's state has been changed.
procedure TForm1.G2antt1CellStateChanged(ASender: TObject; Item : HITEM;ColIndex : Integer);
begin
	with G2antt1 do
	begin
		Refresh();
	end
end;

with G2antt1 do
begin
	BeginUpdate();
	LinesAtRoot := EXG2ANTTLib_TLB.exLinesAtRoot;
	with (IUnknown(Columns.Add('Tasks')) as EXG2ANTTLib_TLB.Column) do
	begin
		Def[EXG2ANTTLib_TLB.exCellHasCheckBox] := OleVariant(True);
		PartialCheck := True;
	end;
	with ConditionalFormats.Add('%CS0 = 1',Null) do
	begin
		Bold := True;
	end;
	HeaderVisible := EXG2ANTTLib_TLB.exHeaderVisibleExtendLevels;
	with Chart do
	begin
		FirstVisibleDate := '8/1/2017';
		LevelCount := 2;
		PaneWidth[False] := 128;
		with Bars.Item['Summary'] do
		begin
			StartShape := EXG2ANTTLib_TLB.exShapeIconEmpty;
			EndShape := EXG2ANTTLib_TLB.exShapeIconEmpty;
			Shape := EXG2ANTTLib_TLB.exShapeThinDown;
		end;
		SelBackColor := G2antt1.SelBackColor;
		SelBarColor := $808080;
	end;
	with Items do
	begin
		h := AddItem('Project');
		hChild := InsertItem(h,Null,'Task 1');
		AddBar(hChild,'Task','8/2/2017','8/8/2017',Null,Null);
		SelectItem[hChild] := True;
		hChild := InsertItem(h,Null,'Task 2');
		AddBar(hChild,'Task','8/3/2017','8/10/2017',Null,Null);
		CellState[OleVariant(hChild),OleVariant(0)] := 1;
		hChild := InsertItem(h,Null,'Task 3');
		AddBar(hChild,'Task','8/4/2017','8/12/2017',Null,Null);
		CellState[OleVariant(hChild),OleVariant(0)] := 1;
		AddBar(h,'Summary','8/1/2017','8/1/2017','sum',Null);
		DefineSummaryBars(h,'sum',-3,'');
		ExpandItem[h] := True;
	end;
	EndUpdate();
end
1979
How can I change the foreground color for checked items

// CellStateChanged event - Fired after cell's state has been changed.
procedure TForm1.G2antt1CellStateChanged(ASender: TObject; Item : HITEM;ColIndex : Integer);
begin
	with G2antt1 do
	begin
		Refresh();
	end
end;

with G2antt1 do
begin
	BeginUpdate();
	LinesAtRoot := EXG2ANTTLib_TLB.exLinesAtRoot;
	SelBackMode := EXG2ANTTLib_TLB.exTransparent;
	with (IUnknown(Columns.Add('Tasks')) as EXG2ANTTLib_TLB.Column) do
	begin
		Def[EXG2ANTTLib_TLB.exCellHasCheckBox] := OleVariant(True);
		PartialCheck := True;
	end;
	with ConditionalFormats.Add('%CS0 = 1',Null) do
	begin
		ForeColor := $8080ff;
	end;
	HeaderVisible := EXG2ANTTLib_TLB.exHeaderVisibleExtendLevels;
	with Chart do
	begin
		FirstVisibleDate := '8/1/2017';
		LevelCount := 2;
		PaneWidth[False] := 128;
		with Bars.Item['Summary'] do
		begin
			StartShape := EXG2ANTTLib_TLB.exShapeIconEmpty;
			EndShape := EXG2ANTTLib_TLB.exShapeIconEmpty;
			Shape := EXG2ANTTLib_TLB.exShapeThinDown;
		end;
		SelBackColor := G2antt1.SelBackColor;
		SelBarColor := $808080;
	end;
	with Items do
	begin
		h := AddItem('Project');
		hChild := InsertItem(h,Null,'Task 1');
		AddBar(hChild,'Task','8/2/2017','8/8/2017',Null,Null);
		SelectItem[hChild] := True;
		hChild := InsertItem(h,Null,'Task 2');
		AddBar(hChild,'Task','8/3/2017','8/10/2017',Null,Null);
		CellState[OleVariant(hChild),OleVariant(0)] := 1;
		hChild := InsertItem(h,Null,'Task 3');
		AddBar(hChild,'Task','8/4/2017','8/12/2017',Null,Null);
		CellState[OleVariant(hChild),OleVariant(0)] := 1;
		AddBar(h,'Summary','8/1/2017','8/1/2017','sum',Null);
		DefineSummaryBars(h,'sum',-3,'');
		ExpandItem[h] := True;
	end;
	EndUpdate();
end
1978
How can I change the background color for checked items (solid color)

// CellStateChanged event - Fired after cell's state has been changed.
procedure TForm1.G2antt1CellStateChanged(ASender: TObject; Item : HITEM;ColIndex : Integer);
begin
	with G2antt1 do
	begin
		Refresh();
	end
end;

with G2antt1 do
begin
	BeginUpdate();
	LinesAtRoot := EXG2ANTTLib_TLB.exLinesAtRoot;
	SelBackMode := EXG2ANTTLib_TLB.exTransparent;
	with (IUnknown(Columns.Add('Tasks')) as EXG2ANTTLib_TLB.Column) do
	begin
		Def[EXG2ANTTLib_TLB.exCellHasCheckBox] := OleVariant(True);
		PartialCheck := True;
	end;
	with ConditionalFormats.Add('%CS0 = 1',Null) do
	begin
		BackColor := $8080ff;
		ChartBackColor := BackColor;
	end;
	HeaderVisible := EXG2ANTTLib_TLB.exHeaderVisibleExtendLevels;
	with Chart do
	begin
		FirstVisibleDate := '8/1/2017';
		LevelCount := 2;
		PaneWidth[False] := 128;
		with Bars.Item['Summary'] do
		begin
			StartShape := EXG2ANTTLib_TLB.exShapeIconEmpty;
			EndShape := EXG2ANTTLib_TLB.exShapeIconEmpty;
			Shape := EXG2ANTTLib_TLB.exShapeThinDown;
		end;
		SelBackColor := G2antt1.SelBackColor;
		SelBarColor := $808080;
	end;
	with Items do
	begin
		h := AddItem('Project');
		hChild := InsertItem(h,Null,'Task 1');
		AddBar(hChild,'Task','8/2/2017','8/8/2017',Null,Null);
		SelectItem[hChild] := True;
		hChild := InsertItem(h,Null,'Task 2');
		AddBar(hChild,'Task','8/3/2017','8/10/2017',Null,Null);
		CellState[OleVariant(hChild),OleVariant(0)] := 1;
		hChild := InsertItem(h,Null,'Task 3');
		AddBar(hChild,'Task','8/4/2017','8/12/2017',Null,Null);
		CellState[OleVariant(hChild),OleVariant(0)] := 1;
		AddBar(h,'Summary','8/1/2017','8/1/2017','sum',Null);
		DefineSummaryBars(h,'sum',-3,'');
		ExpandItem[h] := True;
	end;
	EndUpdate();
end
1977
How can I change the color for checked Task bars

with G2antt1 do
begin
	BeginUpdate();
	LinesAtRoot := EXG2ANTTLib_TLB.exLinesAtRoot;
	with (IUnknown(Columns.Add('Tasks')) as EXG2ANTTLib_TLB.Column) do
	begin
		Def[EXG2ANTTLib_TLB.exCellHasCheckBox] := OleVariant(True);
		PartialCheck := True;
	end;
	with ConditionalFormats.Add('%CS0 = 1',Null) do
	begin
		ApplyToBars := 'Task,Summary';
		BarColor := $ff;
	end;
	HeaderVisible := EXG2ANTTLib_TLB.exHeaderVisibleExtendLevels;
	SelBackColor := RGB(240,240,240);
	SelForeColor := RGB(0,0,0);
	with Chart do
	begin
		FirstVisibleDate := '8/1/2017';
		LevelCount := 2;
		PaneWidth[False] := 128;
		with Bars.Item['Summary'] do
		begin
			StartShape := EXG2ANTTLib_TLB.exShapeIconEmpty;
			EndShape := EXG2ANTTLib_TLB.exShapeIconEmpty;
			Shape := EXG2ANTTLib_TLB.exShapeThinDown;
		end;
		SelBackColor := G2antt1.SelBackColor;
		SelBarColor := $808080;
	end;
	with Items do
	begin
		h := AddItem('Project');
		hChild := InsertItem(h,Null,'Task 1');
		AddBar(hChild,'Task','8/2/2017','8/8/2017',Null,Null);
		SelectItem[hChild] := True;
		hChild := InsertItem(h,Null,'Task 2');
		AddBar(hChild,'Task','8/3/2017','8/10/2017',Null,Null);
		CellState[OleVariant(hChild),OleVariant(0)] := 1;
		hChild := InsertItem(h,Null,'Task 3');
		AddBar(hChild,'Task','8/4/2017','8/12/2017',Null,Null);
		CellState[OleVariant(hChild),OleVariant(0)] := 1;
		AddBar(h,'Summary','8/1/2017','8/1/2017','sum',Null);
		DefineSummaryBars(h,'sum',-3,'');
		ExpandItem[h] := True;
	end;
	EndUpdate();
end
1976
I have defined "NonWorkingHours" for the Gantt, and the "exBarWorkingCount" properly excludes these hours as long as the Gantt is using "exDay" or "exHour" as the level unit. However when displaying a quarter or a year, I'm changing the unit to "exWeek", but then the "NonWorkingHours" are no longer excluded from the bars "exBarWorkingCount" and displays the wrong value

with G2antt1 do
begin
	BeginUpdate();
	with Columns do
	begin
		(IUnknown(Add('Tasks')) as EXG2ANTTLib_TLB.Column).AllowSizing := False;
		with (IUnknown(Add('Working')) as EXG2ANTTLib_TLB.Column) do
		begin
			Def[EXG2ANTTLib_TLB.exCellValueToItemBarProperty] := OleVariant(258);
			Def[EXG2ANTTLib_TLB.exCellValueToItemBarKey] := 'A';
			FormatColumn := '((1:=int(0:=( 24*int(value) + (value - int(value) + 1/24/60/60/2)*24))) != 0 ? =:1 + '' hour(s)'' : '''' ) + (=:1 ? '' '' : '''' ) + ((1' + 
	':=round((=:0 - =:1)*60)) != 0 ? =:1 + '' min(s)'' : '''')';
		end;
	end;
	Items.AllowCellValueToItemBar := True;
	with Chart do
	begin
		AllowResizeChart := Integer(EXG2ANTTLib_TLB.exAllowChangeUnitScale) Or Integer(EXG2ANTTLib_TLB.exAllowResizeChartMiddle) Or Integer(EXG2ANTTLib_TLB.exAllowResizeChartHeader);
		PaneWidth[False] := 196;
		Bars.Add('Task:Split').Shortcut := 'Task';
		FirstVisibleDate := '1/3/2002';
		LevelCount := 2;
		Level[0].Label := '<%ddd%>';
		Level[1].Label := '<%hh%>';
		NonworkingHours := 16761855;
		ShowNonworkingUnits := False;
		ShowNonworkingUnits := False;
		OverviewVisible := EXG2ANTTLib_TLB.exOverviewShowAll;
		OverviewHeight := 64;
		AllowOverviewZoom := EXG2ANTTLib_TLB.exAlwaysZoom;
	end;
	with Items do
	begin
		h := AddItem('Task 1');
		AddBar(h,'Task','1/4/2002','1/8/2002','A',Null);
		ItemBar[h,'A',EXG2ANTTLib_TLB.exBarKeepWorkingCount] := OleVariant(True);
		h := AddItem('Task 2');
		AddBar(h,'Task','1/3/2002','1/4/2002','A',Null);
		ItemBar[h,'A',EXG2ANTTLib_TLB.exBarKeepWorkingCount] := OleVariant(True);
	end;
	with Chart do
	begin
		UnitScale := EXG2ANTTLib_TLB.exDay;
		ScrollTo(FirstVisibleDate,OleVariant(1));
	end;
	EndUpdate();
end
1975
Is it possible to customize the editor selection colour of the built in text editor, from standard blue to black

with G2antt1 do
begin
	BeginUpdate();
	Chart.PaneWidth[True] := 0;
	SelBackColor := RGB(0,0,0);
	SelForeColor := RGB(255,255,255);
	Chart.PaneWidth[True] := 0;
	with (IUnknown(Columns.Add('Edit')) as EXG2ANTTLib_TLB.Column).Editor do
	begin
		EditType := EXG2ANTTLib_TLB.MaskType;
		Mask := ';;;rich';
	end;
	with Items do
	begin
		AddItem('');
		AddItem('Just a text');
		AddItem('');
	end;
	EndUpdate();
end
1974
Is it possible to customize the editor selection colour of the built in dropdown editor, from standard blue to black

with G2antt1 do
begin
	BeginUpdate();
	SelBackColor := RGB(0,0,0);
	SelForeColor := RGB(255,255,255);
	Chart.PaneWidth[True] := 0;
	with (IUnknown(Columns.Add('DropDown')) as EXG2ANTTLib_TLB.Column).Editor do
	begin
		AddItem(1,'This is just the first item',Null);
		AddItem(2,'This is just the second item',Null);
		AddItem(3,'This is just the third item',Null);
		EditType := EXG2ANTTLib_TLB.DropDownType;
		Mask := ';;;rich';
	end;
	with Items do
	begin
		AddItem('');
		AddItem('Just a text');
		AddItem('');
	end;
	EndUpdate();
end
1973
When I display the chart in the daily view, the histogram shows correctly the data while if the chart displays the data in weekly or monthly view, the histogram shows no data or incorrectly. What can be the problem

// OverviewZoom event - Occurs once the user selects a new time scale unit in the overview zoom area.
procedure TForm1.G2antt1OverviewZoom(ASender: TObject; );
begin
	with G2antt1 do
	begin
		Chart.ResizeUnitScale := EXG2ANTTLib_TLB.exDay;
	end
end;

with G2antt1 do
begin
	BeginUpdate();
	Columns.Add('Tasks');
	with (IUnknown(Columns.Add('Effort')) as EXG2ANTTLib_TLB.Column) do
	begin
		Def[EXG2ANTTLib_TLB.exCellValueToItemBarProperty] := OleVariant(21);
		Editor.EditType := EXG2ANTTLib_TLB.SpinType;
	end;
	with Chart do
	begin
		AllowOverviewZoom := EXG2ANTTLib_TLB.exAlwaysZoom;
		OverviewZoomCaption := '|||<img>3</img>Month|Third|<img>2</img>Week|<img>1</img>Day|||';
		Label[EXG2ANTTLib_TLB.exYear] := '';
		Label[EXG2ANTTLib_TLB.exHalfYear] := '';
		Label[EXG2ANTTLib_TLB.exQuarterYear] := '';
		Label[EXG2ANTTLib_TLB.exThirdMonth] := '';
		Label[EXG2ANTTLib_TLB.exHour] := '';
		Label[EXG2ANTTLib_TLB.exMinute] := '';
		Label[EXG2ANTTLib_TLB.exSecond] := '';
		OverviewZoomUnit := 64;
		LevelCount := 2;
		NonworkingDays := 0;
		PaneWidth[False] := 96;
		FirstVisibleDate := '6/20/2005';
		HistogramVisible := True;
		HistogramHeight := 128;
		HistogramView := EXG2ANTTLib_TLB.exHistogramAllItems;
		OverviewVisible := EXG2ANTTLib_TLB.exOverviewShowAll;
		with Bars.Item['Task'] do
		begin
			HistogramPattern := Pattern;
			HistogramType := EXG2ANTTLib_TLB.exHistOverload;
			HistogramCriticalValue := 3;
			HistogramItems := -7;
			HistogramGridLinesColor := $c0c0c0;
			HistogramRulerLinesColor := $10000;
		end;
	end;
	with Items do
	begin
		AllowCellValueToItemBar := True;
		h1 := AddItem('Task 1');
		AddBar(h1,'Task','6/21/2005','6/23/2005',Null,Null);
		CellValue[OleVariant(h1),OleVariant(1)] := OleVariant(4);
		h1 := AddItem('Task 2');
		AddBar(h1,'Task','6/24/2005','6/26/2005',Null,Null);
		CellValue[OleVariant(h1),OleVariant(1)] := OleVariant(3);
		h1 := AddItem('Task 3');
		AddBar(h1,'Task','6/27/2005','6/29/2005',Null,Null);
		CellValue[OleVariant(h1),OleVariant(1)] := OleVariant(2);
		h1 := AddItem('Task 4');
		AddBar(h1,'Task','6/30/2005','7/2/2005',Null,Null);
		CellValue[OleVariant(h1),OleVariant(1)] := OleVariant(1);
	end;
	EndUpdate();
end
1972
The BeforeExpandItem event is fired when clicking the drop down filter button. What we can do to prevent that
// BeforeExpandItem event - Fired before an item is about to be expanded (collapsed).
procedure TForm1.G2antt1BeforeExpandItem(ASender: TObject; Item : HITEM;var Cancel : OleVariant);
begin
	with G2antt1 do
	begin
		OutputDebugString( 'BeforeExpandItem' );
		OutputDebugString( Item );
		OutputDebugString( 'ColumnFromPoint' );
		OutputDebugString( ColumnFromPoint[-1,-1] );
		OutputDebugString( 'ColumnFromPoint return -1, if the user clicks the +/- glitch, else it returns the index of the column where the click occurs.' );
		Items.InsertItem(Item,Null,'new child');
	end
end;

with G2antt1 do
begin
	BeginUpdate();
	Chart.PaneWidth[True] := 0;
	LinesAtRoot := EXG2ANTTLib_TLB.exLinesAtRoot;
	with Columns do
	begin
		(IUnknown(Add('Items')) as EXG2ANTTLib_TLB.Column).DisplayFilterButton := True;
	end;
	with Items do
	begin
		ItemHasChildren[InsertItem(Null,Null,'Group 1')] := True;
		ItemHasChildren[InsertItem(Null,Null,'Group 2')] := True;
	end;
	EndUpdate();
end
1971
How do I change the drop down filter icon/button (black)

with G2antt1 do
begin
	BeginUpdate();
	with VisualAppearance do
	begin
		Add(1,'gBFLBCJwBAEHhEJAAEhABXUIQAAYAQGKIcBiAKBQAGYBIJDEMgzDDAUBjKKocQTC4AIQjCK4JDKHYJRpHEZyCA8EhqGASRAFUQBYiWE4oSpLABQaK0ZwIGyRIrkGQgQg' + 
	'mPYDSDNU4zVIEEglBI0TDNczhNDENgtGYaJqHIYpZBcM40TKkEZoSIITZcRrOEBiRL1S0RBhGcRUHZlWzdN64LhuK47UrWdD/XhdVzXRbjfz1Oq+bxve48Br7A5yYThd' + 
	'r4LhOFQ3RjIL4xbIcUwGe6VZhjOLZXjmO49T69HTtOCYBEBA');
	end;
	Background[EXG2ANTTLib_TLB.exCursorHoverColumn] := $ffffffff;
	Background[EXG2ANTTLib_TLB.exHeaderFilterBarButton] := $1000000;
	Background[EXG2ANTTLib_TLB.exBackColorFilter] := $10000;
	Background[EXG2ANTTLib_TLB.exForeColorFilter] := $ffffff;
	Description[EXG2ANTTLib_TLB.exFilterBarExclude] := '<bgcolor 0><fgcolor ffffff> Exclude </fgcolor></bgcolor>';
	HeaderAppearance := EXG2ANTTLib_TLB.None2;
	BackColorHeader := RGB(0,0,0);
	ForeColorHeader := RGB(255,255,255);
	HeaderVisible := EXG2ANTTLib_TLB.exHeaderVisible;
	BackColorLevelHeader := BackColor;
	with (IUnknown(Columns.Add('Filter')) as EXG2ANTTLib_TLB.Column) do
	begin
		FilterList := Integer(EXG2ANTTLib_TLB.exShowExclude) Or Integer(EXG2ANTTLib_TLB.exShowCheckBox);
		DisplayFilterButton := True;
		AllowSort := False;
		AllowDragging := False;
	end;
	with Chart do
	begin
		PaneWidth[False] := 196;
		LevelCount := 2;
		BackColorLevelHeader := G2antt1.BackColorHeader;
		ForeColorLevelHeader := G2antt1.ForeColorHeader;
	end;
	with Items do
	begin
		AddItem('One');
		AddItem('Two');
		AddItem('Three');
	end;
	EndUpdate();
end
1970
How do I change the z-order of the bars (percent)

// MouseMove event - Occurs when the user moves the mouse.
procedure TForm1.G2antt1MouseMove(ASender: TObject; Button : Smallint;Shift : Smallint;X : Integer;Y : Integer);
begin
	with G2antt1 do
	begin
		b := Chart.BarFromPoint[-1,-1];
		i := ItemFromPoint[-1,-1,c,hit];
		OutputDebugString( Items.ItemBar[i,OleVariant(b),EXG2ANTTLib_TLB.exBarToolTip] );
	end
end;

with G2antt1 do
begin
	BeginUpdate();
	Columns.Add('Tasks');
	DefaultItemHeight := 52;
	with Chart do
	begin
		LevelCount := 2;
		FirstVisibleDate := '10/10/2017';
		PaneWidth[False] := 0;
		NonworkingDays := 0;
		MarkTodayColor := BackColor;
		Bars.Add('Task%Progress').Shortcut := 'Task';
		with Bars.Copy('Task','T1') do
		begin
			Color := $ff;
			Def[EXG2ANTTLib_TLB.exBarCaption] := '<%=%17 + `<b><font ;6><off -4> (z-key `+%9+`)`%>';
			Def[EXG2ANTTLib_TLB.exBarHAlignCaption] := OleVariant(18);
			Def[EXG2ANTTLib_TLB.exBarPercent] := OleVariant(0.25);
			Def[EXG2ANTTLib_TLB.exBarPercentColor] := OleVariant(Color);
			Def[EXG2ANTTLib_TLB.exBarOffset] := OleVariant(10);
			Def[EXG2ANTTLib_TLB.exBarShowPercentCaption] := OleVariant(True);
			Def[EXG2ANTTLib_TLB.exBarPercentCaptionFormat] := '<font ;6><b>%p%</b>';
		end;
		with Bars.Copy('Task','T2') do
		begin
			Height := 26;
			Def[EXG2ANTTLib_TLB.exBarCaption] := '<%=%17 + `<b><font ;6><off -4> (z-key `+%9+`)`%>';
			Def[EXG2ANTTLib_TLB.exBarVAlignCaption] := OleVariant(16);
			Def[EXG2ANTTLib_TLB.exBarPercent] := OleVariant(0.25);
			Def[EXG2ANTTLib_TLB.exBarPercentColor] := OleVariant(Color);
			Def[EXG2ANTTLib_TLB.exBarShowPercentCaption] := OleVariant(True);
			Def[EXG2ANTTLib_TLB.exBarPercentCaptionFormat] := '<font ;6><b>%p%</b>';
		end;
	end;
	with Items do
	begin
		h1 := AddItem('Task');
		AddBar(h1,'T1','10/15/2017','10/25/2017','2',Null);
		ItemBar[h1,'2',EXG2ANTTLib_TLB.exBarData] := 'Bar A';
		ItemBar[h1,'2',EXG2ANTTLib_TLB.exBarToolTip] := 'Bar A <b>Over</b> Bar B';
		AddBar(h1,'T2','10/18/2017','10/22/2017','1',Null);
		ItemBar[h1,'1',EXG2ANTTLib_TLB.exBarData] := 'Bar B';
		ItemBar[h1,'1',EXG2ANTTLib_TLB.exBarToolTip] := 'Bar B <b>Under</b> Bar A';
		h1 := AddItem('Task');
		AddBar(h1,'T1','10/15/2017','10/25/2017','1',Null);
		ItemBar[h1,'1',EXG2ANTTLib_TLB.exBarData] := 'Bar A';
		ItemBar[h1,'1',EXG2ANTTLib_TLB.exBarToolTip] := 'Bar A <b>Under</b> Bar B';
		AddBar(h1,'T2','10/18/2017','10/22/2017','2',Null);
		ItemBar[h1,'2',EXG2ANTTLib_TLB.exBarData] := 'Bar B';
		ItemBar[h1,'2',EXG2ANTTLib_TLB.exBarToolTip] := 'Bar B <b>Over</b> Bar A';
	end;
	EndUpdate();
end
1969
How do I change the z-order of the bars

// MouseMove event - Occurs when the user moves the mouse.
procedure TForm1.G2antt1MouseMove(ASender: TObject; Button : Smallint;Shift : Smallint;X : Integer;Y : Integer);
begin
	with G2antt1 do
	begin
		b := Chart.BarFromPoint[-1,-1];
		i := ItemFromPoint[-1,-1,c,hit];
		OutputDebugString( Items.ItemBar[i,OleVariant(b),EXG2ANTTLib_TLB.exBarToolTip] );
	end
end;

with G2antt1 do
begin
	BeginUpdate();
	Columns.Add('Tasks');
	DefaultItemHeight := 52;
	with Chart do
	begin
		LevelCount := 2;
		FirstVisibleDate := '10/10/2017';
		PaneWidth[False] := 0;
		NonworkingDays := 0;
		MarkTodayColor := BackColor;
		with Bars.Copy('Task','T1') do
		begin
			Color := $ff;
			Def[EXG2ANTTLib_TLB.exBarCaption] := '<%=%17 + `<b><font ;6><off -4> (z-key `+%9+`)`%>';
			Def[EXG2ANTTLib_TLB.exBarHAlignCaption] := OleVariant(18);
		end;
		with Bars.Copy('Task','T2') do
		begin
			Height := 25;
			Def[EXG2ANTTLib_TLB.exBarCaption] := '<%=%17 + `<b><font ;6><off -4> (z-key `+%9+`)`%>';
			Def[EXG2ANTTLib_TLB.exBarVAlignCaption] := OleVariant(16);
		end;
	end;
	with Items do
	begin
		h1 := AddItem('Task');
		AddBar(h1,'T1','10/15/2017','10/25/2017','2',Null);
		ItemBar[h1,'2',EXG2ANTTLib_TLB.exBarData] := 'Bar A';
		ItemBar[h1,'2',EXG2ANTTLib_TLB.exBarToolTip] := 'Bar A <b>Over</b> Bar B';
		AddBar(h1,'T2','10/18/2017','10/22/2017','1',Null);
		ItemBar[h1,'1',EXG2ANTTLib_TLB.exBarData] := 'Bar B';
		ItemBar[h1,'1',EXG2ANTTLib_TLB.exBarToolTip] := 'Bar B <b>Under</b> Bar A';
		h1 := AddItem('Task');
		AddBar(h1,'T1','10/15/2017','10/25/2017','1',Null);
		ItemBar[h1,'1',EXG2ANTTLib_TLB.exBarData] := 'Bar A';
		ItemBar[h1,'1',EXG2ANTTLib_TLB.exBarToolTip] := 'Bar A <b>Under</b> Bar B';
		AddBar(h1,'T2','10/18/2017','10/22/2017','2',Null);
		ItemBar[h1,'2',EXG2ANTTLib_TLB.exBarData] := 'Bar B';
		ItemBar[h1,'2',EXG2ANTTLib_TLB.exBarToolTip] := 'Bar B <b>Over</b> Bar A';
	end;
	EndUpdate();
end
1968
How do I get the duration/working count of the bar (sample 6,excrd)

with G2antt1 do
begin
	BeginUpdate();
	DefaultItemHeight := 48;
	ShowFocusRect := False;
	SelBackMode := EXG2ANTTLib_TLB.exTransparent;
	BackColorLevelHeader := BackColor;
	DrawGridLines := EXG2ANTTLib_TLB.exAllLines;
	with Chart do
	begin
		DrawGridLines := EXG2ANTTLib_TLB.exHLines;
		PaneWidth[False] := 64;
		LevelCount := 2;
		FirstVisibleDate := '12/26/2001';
		with Bars.Add('Task:Split') do
		begin
			Shortcut := 'Task';
			Def[EXG2ANTTLib_TLB.exBarToolTip] := '<%=%263%>';
			Def[EXG2ANTTLib_TLB.exBarOffset] := OleVariant(-12);
		end;
		ColumnsFormatLevel := '1,2/3';
	end;
	Columns.Add('Tasks');
	with (IUnknown(Columns.Add('Duration')) as EXG2ANTTLib_TLB.Column) do
	begin
		Def[EXG2ANTTLib_TLB.exCellValueToItemBarProperty] := OleVariant(513);
		Visible := False;
		Alignment := EXG2ANTTLib_TLB.LeftAlignment;
		FormatColumn := 'value + `d`';
	end;
	with (IUnknown(Columns.Add('Working')) as EXG2ANTTLib_TLB.Column) do
	begin
		Def[EXG2ANTTLib_TLB.exCellValueToItemBarProperty] := OleVariant(258);
		Visible := False;
		Alignment := EXG2ANTTLib_TLB.RightAlignment;
		FormatColumn := 'value + `w`';
	end;
	with (IUnknown(Columns.Add('Working-Period')) as EXG2ANTTLib_TLB.Column) do
	begin
		Def[EXG2ANTTLib_TLB.exCellValueToItemBarProperty] := OleVariant(263);
		Visible := False;
		Alignment := EXG2ANTTLib_TLB.CenterAlignment;
		FormatColumn := '((value replace `\r\n` with `,`) replace `#` with ``) replace ` ` with ``';
	end;
	with Items do
	begin
		AllowCellValueToItemBar := True;
		AddBar(AddItem('Task 1'),'Task','1/2/2002','1/11/2002',Null,Null);
		AddBar(AddItem('Task 2'),'Task','1/3/2002','1/15/2002',Null,Null);
		AddBar(AddItem('Task 3'),'Task','12/31/2001','1/13/2002',Null,Null);
	end;
	EndUpdate();
end
1967
How do I get the duration/working count of the bar (sample 5)

// AddItem event - Occurs after a new Item has been inserted to Items collection.
procedure TForm1.G2antt1AddItem(ASender: TObject; Item : HITEM);
begin
	with G2antt1 do
	begin
		with Items do
		begin
			ItemMaxHeight[Item] := 64;
		end;
	end
end;

with G2antt1 do
begin
	BeginUpdate();
	BackColorAlternate := RGB(240,240,240);
	with Chart do
	begin
		PaneWidth[False] := 256;
		LevelCount := 2;
		FirstVisibleDate := '1/1/2002';
		with Bars.Add('Task:Split') do
		begin
			Shortcut := 'Task';
			Def[EXG2ANTTLib_TLB.exBarToolTip] := '<%=%263%>';
		end;
		ColumnsFormatLevel := '1,2';
		SelBackColor := G2antt1.SelBackColor;
	end;
	with (IUnknown(Columns.Add('Task')) as EXG2ANTTLib_TLB.Column) do
	begin
		AllowSizing := False;
		Width := 48;
	end;
	with (IUnknown(Columns.Add('Duration')) as EXG2ANTTLib_TLB.Column) do
	begin
		Def[EXG2ANTTLib_TLB.exCellValueToItemBarProperty] := OleVariant(513);
		Visible := False;
		Alignment := EXG2ANTTLib_TLB.LeftAlignment;
	end;
	with (IUnknown(Columns.Add('Working')) as EXG2ANTTLib_TLB.Column) do
	begin
		Def[EXG2ANTTLib_TLB.exCellValueToItemBarProperty] := OleVariant(258);
		Visible := False;
		Alignment := EXG2ANTTLib_TLB.RightAlignment;
	end;
	with (IUnknown(Columns.Add('Working-Period')) as EXG2ANTTLib_TLB.Column) do
	begin
		Def[EXG2ANTTLib_TLB.exCellValueToItemBarProperty] := OleVariant(263);
		Def[EXG2ANTTLib_TLB.exCellSingleLine] := OleVariant(False);
	end;
	with Items do
	begin
		AllowCellValueToItemBar := True;
		AddBar(AddItem('Task 1'),'Task','1/2/2002','1/12/2002',Null,Null);
		AddBar(AddItem('Task 2'),'Task','1/3/2002','1/15/2002',Null,Null);
		AddBar(AddItem('Task 2'),'Task','1/4/2002','1/16/2002',Null,Null);
	end;
	EndUpdate();
end
1966
How do I get the duration/working count of the bar (sample 4)

with G2antt1 do
begin
	BeginUpdate();
	with Chart do
	begin
		PaneWidth[False] := 64;
		LevelCount := 2;
		FirstVisibleDate := '12/26/2001';
		Bars.Add('Task:Split').Shortcut := 'Task';
		ColumnsFormatLevel := '1,2';
	end;
	(IUnknown(Columns.Add('Task')) as EXG2ANTTLib_TLB.Column).Width := 48;
	with (IUnknown(Columns.Add('Duration')) as EXG2ANTTLib_TLB.Column) do
	begin
		Def[EXG2ANTTLib_TLB.exCellValueToItemBarProperty] := OleVariant(513);
		Visible := False;
		Alignment := EXG2ANTTLib_TLB.LeftAlignment;
		FormatColumn := 'value + `d`';
	end;
	with (IUnknown(Columns.Add('Working')) as EXG2ANTTLib_TLB.Column) do
	begin
		Def[EXG2ANTTLib_TLB.exCellValueToItemBarProperty] := OleVariant(258);
		Visible := False;
		Alignment := EXG2ANTTLib_TLB.RightAlignment;
		FormatColumn := 'value + `w`';
	end;
	with Items do
	begin
		AllowCellValueToItemBar := True;
		AddBar(AddItem('Task 1'),'Task','1/2/2002','1/12/2002',Null,Null);
		AddBar(AddItem('Task 2'),'Task','1/3/2002','1/15/2002',Null,Null);
	end;
	EndUpdate();
end
1965
How do I get the duration/working count of the bar (sample 3)

// BarResizing event - Occurs when a bar is moving or resizing.
procedure TForm1.G2antt1BarResizing(ASender: TObject; Item : HITEM;Key : OleVariant);
begin
	with G2antt1 do
	begin
		with Items do
		begin
			OutputDebugString( CellCaption[OleVariant(Item),OleVariant(0)] );
			OutputDebugString( 'Working' );
			OutputDebugString( ItemBar[Item,OleVariant(Key),EXG2ANTTLib_TLB.exBarWorkingCount] );
			OutputDebugString( CellCaption[OleVariant(Item),OleVariant(0)] );
			OutputDebugString( 'Duration' );
			OutputDebugString( ItemBar[Item,OleVariant(Key),EXG2ANTTLib_TLB.exBarDuration] );
		end;
	end
end;

with G2antt1 do
begin
	BeginUpdate();
	with Chart do
	begin
		PaneWidth[False] := 64;
		LevelCount := 2;
		FirstVisibleDate := '12/26/2001';
		Bars.Add('Task:Split').Shortcut := 'Task';
	end;
	(IUnknown(Columns.Add('Task')) as EXG2ANTTLib_TLB.Column).Width := 48;
	with Items do
	begin
		AddBar(AddItem('Task 1'),'Task','1/2/2002','1/12/2002',Null,Null);
		AddBar(AddItem('Task 2'),'Task','1/3/2002','1/15/2002',Null,Null);
	end;
	EndUpdate();
end
1964
How do I get the duration/working count of the bar (sample 2)

with G2antt1 do
begin
	BeginUpdate();
	with Chart do
	begin
		PaneWidth[False] := 64;
		LevelCount := 2;
		FirstVisibleDate := '12/26/2001';
		with Bars.Add('Task:Split') do
		begin
			Shortcut := 'Task';
			Def[EXG2ANTTLib_TLB.exBarCaption] := '<%=%258%>w';
			Def[EXG2ANTTLib_TLB.exBarHAlignCaption] := OleVariant(18);
			Def[EXG2ANTTLib_TLB.exBarExtraCaption] := '<%=%513%>d';
			Def[EXG2ANTTLib_TLB.exBarExtraCaptionHAlign] := OleVariant(16);
		end;
	end;
	(IUnknown(Columns.Add('Task')) as EXG2ANTTLib_TLB.Column).Width := 48;
	with Items do
	begin
		AddBar(AddItem('Task 1'),'Task','1/2/2002','1/12/2002',Null,Null);
		AddBar(AddItem('Task 2'),'Task','1/3/2002','1/15/2002',Null,Null);
	end;
	EndUpdate();
end
1963
How do I get the duration/working count of the bar (sample 1)

with G2antt1 do
begin
	BeginUpdate();
	with Chart do
	begin
		PaneWidth[False] := 196;
		LevelCount := 2;
		FirstVisibleDate := '1/1/2002';
		Bars.Add('Task:Split').Shortcut := 'Task';
	end;
	(IUnknown(Columns.Add('Task')) as EXG2ANTTLib_TLB.Column).Width := 48;
	(IUnknown(Columns.Add('Duration')) as EXG2ANTTLib_TLB.Column).Def[EXG2ANTTLib_TLB.exCellValueToItemBarProperty] := OleVariant(513);
	(IUnknown(Columns.Add('Working')) as EXG2ANTTLib_TLB.Column).Def[EXG2ANTTLib_TLB.exCellValueToItemBarProperty] := OleVariant(258);
	with Items do
	begin
		AllowCellValueToItemBar := True;
		AddBar(AddItem('Task 1'),'Task','1/2/2002','1/12/2002',Null,Null);
		AddBar(AddItem('Task 2'),'Task','1/3/2002','1/15/2002',Null,Null);
	end;
	EndUpdate();
end
1962
How can I draw a solid frame around the the focusing item

with G2antt1 do
begin
	BeginUpdate();
	SingleSel := False;
	DefaultItemHeight := 20;
	with VisualAppearance do
	begin
		RenderType := -1;
		Add(1,'gBFLBCJwBAEHhEJAAEhABOkGACAADACAxRDgMQBQKAAzAJBIYhkGYYYCgMZRUDGCYXABCEYRXBKUQSDqEYyjGLIXAWCYSAAMIwDKAUEwpFAZBhgeDYMiSNoYDJCM4wHI' + 
	'URRJFCUJSGWQpTgSIgyT5HFIxXKoASbJabZLhWS6EpWOotTbIQQRYCkEyfKKfZyGURZQqOKA1DBZErWTJESRFJqLazgO4LAhyQYrVgAErzVKVCRNOqbJzADApdpGQJTU' + 
	'LDNTQHRFIyhOSnIRrWbMAhid6JUZiVT4dBOIYhSYANAqCwLFqrDJmWrpV5WZjlZ47V6BdAyXJsIrmFJEXaOGhyDDlGybSDZYryfZhUziUw4XjbWwZDqPF6DKTTdSGLRE' + 
	'E8WZVlURZvDaep3C+AY8kAYRgGCCBJECUhjDoHROEYWgoAGTQ1CEEx9lGMY0CQUYSnuZQDBGBYFlOH5+H+igGAKAJgEgFgGgGVgDn4CoCmCSA2A6A5hAgDgQgSYRIE4E' + 
	'oFGGCBiBeBhhkgPgbgcYgICoH4IGGWIOCSBhiGiHgVgoYooFoAoLGIWI+DCCgjCiTgrgII4ImYOoOmOSJ2AYOpWlQDQBICA=');
	end;
	ShowFocusRect := True;
	Background[EXG2ANTTLib_TLB.exShowFocusRect] := $1000000;
	LinesAtRoot := EXG2ANTTLib_TLB.exLinesAtRoot;
	Chart.PaneWidth[True] := 1;
	with (IUnknown(Columns.Add('P1')) as EXG2ANTTLib_TLB.Column) do
	begin
		Def[EXG2ANTTLib_TLB.exCellHasCheckBox] := OleVariant(True);
		PartialCheck := True;
	end;
	with Items do
	begin
		h := AddItem('Root');
		InsertItem(h,Null,'Child 1');
		InsertItem(h,Null,'Child 2');
		ExpandItem[h] := True;
	end;
	EndUpdate();
end
1961
The frame around the focusing item is not very clear. Can I show it larger or more cleared (sample 2)

with G2antt1 do
begin
	BeginUpdate();
	SingleSel := False;
	DefaultItemHeight := 20;
	ShowFocusRect := True;
	with VisualAppearance do
	begin
		RenderType := -1;
		Add(2,'gBFLBCJwBAEHhEJAAEhABPEGACAADACAxRDgMQBQKAAzAJBIYhkGYYYCgMZRUDGCYXABCEYRXBKUQSDqEYyjGLIXAWCYSAAMIwDKAUEwpFAZBhgeCRUgyJI3RgMUIzVA' + 
	'cRRFEiUJQlIZZCjOAw0SIMU7xZRcNxsACnaZnCR4NiuRYiUhOcqzRIQIQ4CiEahqOgJbDUJYwWZKAyjBY8XTZFCSJCpeJ6egOc5jRxQUp1WAEXx3GSsJKvCZ5cADBY+V' + 
	'LQNS0JBtMSTKSLaiuWoIJqCPaDRheWKQJh1NSnLqEcjyYANDxDCZlWzAYxWTZ2Uz7N7PbB0HY4DyPGKZYrfESVRbQcZNS6nNigPI9XhfGq6VjRe63ZaOaYpWrnOJqTRW' + 
	'jOKYujWdZ2BGO5lkuBAAkmcQkDmDBEAwEQJCgGhMGcQ4pkiSxGAAOYmkQIhvkYNg2gSCgyj+LI4GIMIwF2XQoAYAoAmASAWAaAZgggJgKFiT54DYDoDmECBGBKBJgGgT' + 
	'gWgWYRoFYGIGmGOBqByB5hCgegggiYJYgoJIICIaIeByChiigYgsgsYYYBYMIKCMKJOCuDRjGiOgLg6Y5InYPoPmQCAkmsXAQDQBCAg=');
		Add(3,'CP:2 -3 0 3 0');
	end;
	Background[EXG2ANTTLib_TLB.exShowFocusRect] := $3010101;
	LinesAtRoot := EXG2ANTTLib_TLB.exLinesAtRoot;
	Chart.PaneWidth[True] := 1;
	with (IUnknown(Columns.Add('P1')) as EXG2ANTTLib_TLB.Column) do
	begin
		Def[EXG2ANTTLib_TLB.exCellHasCheckBox] := OleVariant(True);
		PartialCheck := True;
	end;
	with Items do
	begin
		h := AddItem('Root');
		InsertItem(h,Null,'Child 1');
		InsertItem(h,Null,'Child 2');
		ExpandItem[h] := True;
	end;
	EndUpdate();
end
1960
The frame around the focusing item is not very clear. Can I show it larger or more cleared (sample 1)

with G2antt1 do
begin
	BeginUpdate();
	SingleSel := False;
	ShowFocusRect := True;
	with VisualAppearance do
	begin
		Add(1,'gBFLBCJwBAEHhEJAAEhABHoDg6AADACAxRDgMQBQKAAzAJBIYhkGYYYCgMZRUDGCYXABCEYRXBIZQ7BKNIxjSJwFiCCQwSDKEjyCKcGRHF6MI6gOYpCgOIYjRJNIASVA' + 
	'ceAAGaUZrjSgobjmOYhAJCLqhYIgASXJqLaBlOCaAieSc+QhjQJIJoeCZXU5TFg1BTsOhqEqcRiseaRVDCaIJWzbdYWLDdNQHHKYLjnWorbpSJZ5XjNEySDQkMS9PrEJ' + 
	'7vST8FBCdAABLJUB2BR9RwxRafKpnWwJDpmCaOQLXEB5DK1PyVMTKYrtGy7GrIAJxWxbV4UHh+QABOzIMAvHKJMwvHYcUZne5XVLeF41HbONogPaJZyIAK2cLROq6Xo7' + 
	'GEcJZEcLASB4DwvgWUZlE6AQQhKAYkkYdA6hyDIwHgSoqFwQgmnsYxjGgSIiBOTpSEiAwRgOJI7j4JAHA6U5wm0MpPlOBIjD8TZiGYCICiCGAuA6AxhAgMgSgOYQ4DYB' + 
	'g/g6cw1n+ABOmMMJ9DmCwjnScw4RsVJngkYh4hoKIKmKKI2CmC5ikiQgqgiT5jhyMw8g4QwIn0OIKEiCJhD8DwTGyfA7k0WQOEWEQkGkJhIhKZB5DYSoTiSCQEn4PQOC' + 
	'OXJcCeIJjliaIQk0aRyF4O5llmAhfhgZhJg4ZoYiaAxYn4PZOhOZJaCUZYTiYQw1mcOZUm+HQnHmWh4h6Z4pnYeYfk0eYsmqG4nAgNJ2DqD5DkCWoiGiOgqgyI5omoRo' + 
	'NiSaQKFKEojCaM4ugSFhOjkAJcieKgDkaH4oioGoOiaKRqgqEoqDddwyhuAxPgOMJ8DyDZqk6NYtCsapmjiLprHqdo6i+K5K1oPhOlqPgKD4DpjnII4yiOewuk6MxtAs' + 
	'MpSjObQ7EaT4wk6ewYn0PgPAiCJkjeLgDk6X44i4G4OmaORuguEpqDkLAzkaWg+E8GIUmaPIvEOVpzj2Lxbl6eo+G+S5in4OYPmOaJyjuTwjnYWpBg6DAjAqQZwkwJwN' + 
	'kKcJsEcEJCDBEpaD6Dw8BiapGjGSgfB2RpxmyBwgkicZ8haBw/g+M5TBcPQPlOXJskscp8jsMJMnMLJXDGTZzEyYw2kwMoDlcFw9i2M4/EGUJPg0CxFlENBtCcSJSnQf' + 
	'Q0m+SgPHsaJ7lALZLG6XZVHWDRfFqVY1k0ZxdladYTnifJUGaeAWAeMnSGcGWgBObJ3lWbwdjKW5cHcTZPHaLkN4GxXDlFqFsA4uRbBOGAFAEIzAsDEFOBkfYqR4D6AO' + 
	'BEYo8QuBvAmMceInBDgcD0JwOIqQyJ1DMAwG4IANDnHSMoK4QhOgMBGNEIQvQWAdGenETIswGiddsAAQAgCAgA==');
		Add(2,'gBFLBCJwBAEHhEJAAEhABeEGACAADACAxRDgMQBQKAAzAJBIYhkGYYYCgMZRUDGCYXABCEYRXBIZQ7BKNIxjSJwFgmEgADDFIBQSLAYROGSDJBGODJDjWGIeQLOEhQHI' + 
	'MRxPE6UYLhWYpBDKPYcUbGc7yBBMVwGf59XzACoKSheQIVSDQkw6Fo6NYhAxHALyNRkBy8f60KjtGpodDUJYvW5JYyjBZ8EznOqbJBkeJ7BgOe5NQjaD72VgdWQJFSWJ' + 
	'ajWYYJDOJY2ZAAE5TVINEwxJbDaylChIdxaF6WAzZEBhBYoATPNLBMrhWqKDw2XaQWBCOgwHYeR5LU7BdRwbIrRq2eAAXbcVyXfDddZlBK+QA0SK9lRVTKvJZmKgBWw1' + 
	'COSxmAAGw4kcNx1iKFBiCAfQsG8lJemucg7nsXpUHOOxrm+DI3jOH4XAOBx2nscw0j2HhPG4L5uGEVIECQCBCEUAYkGMHQHFGSBlGaAxkEgQgTGCVBsDYQhCgQJZrHKU' + 
	'ggGEShkFGNgIlsNpPnMHJHD+TADAIJIJiIWIeCqChikiIgmgiD5zHyXxgiACJKCuC4jHiZgtg6I4IlkCQwkwOIonMPJjEkFhGhGZBpA4KoMBCGJuEiE5lAkGg7hMY4JE' + 
	'YVoUCUNAOE6FZl0KWQACWOR2GKF5mBmChchkJRZhoXYaCKKYqGuDglEmNhuhWZpIiYc4dCcCRqGmHZlgm2YxAwSQKESHwkFkKgpiAIAIH4PIimOOg2DiChoiQJRRD+TZ' + 
	'DHCfwyAyCgyg+JpiioYJ/DgDgIlECQ6lwRAEICA=');
		Add(3,'CP:2 -2 0 2 0');
	end;
	SelBackColor := $1000000;
	SelForeColor := RGB(0,0,0);
	Chart.PaneWidth[True] := 1;
	Background[EXG2ANTTLib_TLB.exShowFocusRect] := $3ff0000;
	LinesAtRoot := EXG2ANTTLib_TLB.exLinesAtRoot;
	with (IUnknown(Columns.Add('P1')) as EXG2ANTTLib_TLB.Column) do
	begin
		Def[EXG2ANTTLib_TLB.exCellHasCheckBox] := OleVariant(True);
		PartialCheck := True;
	end;
	with Items do
	begin
		h := AddItem('Root');
		InsertItem(h,Null,'Child 1');
		InsertItem(h,Null,'Child 2');
		ExpandItem[h] := True;
	end;
	EndUpdate();
end
1959
How can I display the start/end margins of bars, when cursor hovers it like a tooltip

with G2antt1 do
begin
	BeginUpdate();
	Columns.Add('exBarToolTip');
	with Chart do
	begin
		PaneWidth[False] := 96;
		FirstVisibleDate := '1/1/2001';
		Bars.Item['Task'].Def[EXG2ANTTLib_TLB.exBarToolTip] := '<b><%=%9 + ''/'' + %C0%></b><br><upline><dotline>Start: <%=%1%><br>End: <%=%2%><br>Duration: <%=(%2-%1)%><br>Working: <%=%258%>';
	end;
	with Items do
	begin
		AddBar(AddItem('Bar.Def'),'Task','1/2/2001','1/9/2001','K1',Null);
		AddBar(AddItem('Bar.Def'),'Task','1/3/2001','1/10/2001','K1',Null);
		h := AddItem('Items.ItemBar');
		AddBar(h,'Unknown','1/4/2001','1/11/2001','K',Null);
		ItemBar[h,'K',EXG2ANTTLib_TLB.exBarToolTip] := 'Start:<%=%1%><br>End:<%=%2%>';
	end;
	EndUpdate();
end
1958
Is it possible to define different kinds of summary bars with using the EBN files

with G2antt1 do
begin
	BeginUpdate();
	with VisualAppearance do
	begin
		RenderType := -16777216;
		Add(1,'gBFLBCJwBAEHhEJAAEhABN0GACAADACAxRDAMgBQKAAzQFAYahuGSGAAGMYxQgmFgAQhFcZQSKUOQTDKMIziYBYJhEMQyDAAUIjOKsIhkGYcZAGQBJCjWGodQLOEgwHI' + 
	'ERQjEyUJAGGQIHhyPYbUbGUpQHKkeRtGqgBgoKhKEouNYgAbGYIwTRsdyfDSXBpEWwbDgkNQwWTDNoRDIUQStCysaYjOpnfrUAJ1P7FdQ1NJkXRhGSSK7maapaiCSZ6S' + 
	'TCMj1FhVKSNJ7DQKhGpgKh/ApgYpQOK4fLNXyRBK4QAyKA6bgPFZOZbFViaXY1V5bNKrcjhHQwAyHJ4XXRdV4YRAkUT4GqiJKGSYcQhuXZWbRqO6ABhef6DRThc6jKpF' + 
	'HIE4llEcojHqSZNgoIxnlgd5thsLREleL43gsYZ9BkaAYkMAgAm+CxGDWWAtiKCRfjcdRgHoHYnicUwgAIEIREAaQYkcQZUHIGRUDQJBOEYRAhDYCxGgMZAkCgdYQhaX' + 
	'QIAYERwQuahXggdgeG6VZ4H4IhdiIGIOB8YIiGiHZZgqYpGF4KYHiKCI+CAU5jCiTQ2g0YhEFyax4gABAEIC');
		Add(2,'gBFLBCJwBAEHhEJAAEhABU0IQAAYAQGKQYhiAKBQAGaAoDDcMA4QwAAyjAKMEwsACEIrjKCRShyCYZRhGcTAJBMIhiGQYAChEZxVhEMgzDjIAxSJAcQRFESaAABGCQGh' + 
	'+N4/S4NIi0CIsZQjCaiZ7pKA5bgMCo+UrNMixZQVCSOGChYRpCaZWpGGodQRUFbVHAlKypJKCKrEWSrDhuYAAW7XM7yBS1TzVNSuLZtaLqSroAJ1WTWMB0Ra8NzZEKfa' + 
	'ZACj4arKejrRDCMAggI=');
	end;
	Columns.Add('Task');
	with Chart do
	begin
		PaneWidth[False] := 128;
		FirstVisibleDate := '1/1/2001';
		with Bars.Item['Task'] do
		begin
			Def[EXG2ANTTLib_TLB.exBarHAlignCaption] := OleVariant(18);
			Color := $1;
		end;
		with Bars.Item['Summary'] do
		begin
			Def[EXG2ANTTLib_TLB.exBarHAlignCaption] := OleVariant(18);
			Color := $2000000;
		end;
	end;
	with Items do
	begin
		hSummaryJ := AddItem('Summary A');
		AddBar(hSummaryJ,'Summary','1/2/2001','1/2/2001','J',Null);
		hTaskJ := InsertItem(hSummaryJ,Null,'Task A.1');
		AddBar(hTaskJ,'Task','1/2/2001','1/5/2001','J1',Null);
		hTaskJ := InsertItem(hSummaryJ,Null,'Task A.2');
		AddBar(hTaskJ,'Task','1/4/2001','1/8/2001','J2',Null);
		DefineSummaryBars(hSummaryJ,'J',-1,'<*>');
		hSummaryK := AddItem('Summary B');
		AddBar(hSummaryK,'Summary','1/2/2001','1/2/2001','K',Null);
		hTaskK := InsertItem(hSummaryK,Null,'Task B.1');
		AddBar(hTaskK,'Task','1/2/2001','1/5/2001','K1',Null);
		hTaskK := InsertItem(hSummaryK,Null,'Task B.2');
		AddBar(hTaskK,'Task','1/4/2001','1/8/2001','K2',Null);
		DefineSummaryBars(hSummaryK,'K',-1,'<*>');
		ItemBar[0,'<K*>',EXG2ANTTLib_TLB.exBarColor] := OleVariant(255);
		hSummaryZ := AddItem('Summary B');
		AddBar(hSummaryZ,'Summary','1/2/2001','1/2/2001','Z',Null);
		hTaskZ := InsertItem(hSummaryZ,Null,'Task B.1');
		AddBar(hTaskZ,'Task','1/2/2001','1/5/2001','Z1',Null);
		hTaskZ := InsertItem(hSummaryZ,Null,'Task B.2');
		AddBar(hTaskZ,'Task','1/4/2001','1/8/2001','Z2',Null);
		DefineSummaryBars(hSummaryZ,'Z',-1,'<*>');
		ItemBar[hSummaryZ,'Z',EXG2ANTTLib_TLB.exBarColor] := OleVariant(16842496);
		ItemBar[0,'<Z1>',EXG2ANTTLib_TLB.exBarColor] := OleVariant(50266112);
		ItemBar[0,'<Z2>',EXG2ANTTLib_TLB.exBarColor] := OleVariant(33554176);
		ExpandItem[0] := True;
	end;
	EndUpdate();
end
1957
How can I display the week-number in ISO8601 format

with G2antt1 do
begin
	BeginUpdate();
	with Chart do
	begin
		PaneWidth[False] := 0;
		LevelCount := 2;
		FirstVisibleDate := '12/12/2007';
		DrawGridLines := EXG2ANTTLib_TLB.exAllLines;
		UnitScale := EXG2ANTTLib_TLB.exWeek;
		Level[0].FormatLabel := 'value + `<r><off -4><fgcolor=808080><font ;6>` + year(dvalue)';
		Level[1].FormatLabel := '(value = 1 ? `<bgcolor=000000><fgcolor=FFFFFF>` : ``) + value';
		WeekNumberAs := EXG2ANTTLib_TLB.exISO8601WeekNumber;
		FirstWeekDay := EXG2ANTTLib_TLB.exMonday;
	end;
	EndUpdate();
end
1956
I have a column right-aligned. How can I display its check box aligned to the right, as it appears to the left of the cell's caption

with G2antt1 do
begin
	BeginUpdate();
	ColumnAutoResize := True;
	Chart.PaneWidth[True] := 0;
	DrawGridLines := EXG2ANTTLib_TLB.exVLines;
	with Columns do
	begin
		with (IUnknown(Add('Left')) as EXG2ANTTLib_TLB.Column) do
		begin
			AllowSizing := False;
			Width := 96;
			Def[EXG2ANTTLib_TLB.exCellHasCheckBox] := OleVariant(True);
			FormatColumn := '0 pos `A-Z`';
		end;
		with (IUnknown(Add('Center')) as EXG2ANTTLib_TLB.Column) do
		begin
			HeaderAlignment := EXG2ANTTLib_TLB.CenterAlignment;
			Alignment := HeaderAlignment;
			AllowSizing := False;
			Width := 96;
			Def[EXG2ANTTLib_TLB.exCellHasCheckBox] := OleVariant(True);
			FormatColumn := '0 pos `A-Z`';
		end;
		with (IUnknown(Add('Right')) as EXG2ANTTLib_TLB.Column) do
		begin
			HeaderAlignment := EXG2ANTTLib_TLB.RightAlignment;
			Alignment := HeaderAlignment;
			AllowSizing := False;
			Width := 96;
			Def[EXG2ANTTLib_TLB.exCellHasCheckBox] := OleVariant(True);
			FormatColumn := '0 pos `A-Z`';
			Def[EXG2ANTTLib_TLB.exCellDrawPartsOrder] := 'caption,check,icon,icons,picture';
		end;
		Add('');
	end;
	with Items do
	begin
		CellState[OleVariant(AddItem('Item 1')),OleVariant(3)] := 1;
		CellState[OleVariant(AddItem('Item 2')),OleVariant(2)] := 1;
		CellState[OleVariant(AddItem('Item 3')),OleVariant(1)] := 1;
	end;
	EndUpdate();
end
1955
Can I display the column's multiple-lines caption vertically oriented (method 2)

with G2antt1 do
begin
	BeginUpdate();
	HeaderHeight := 48;
	ColumnAutoResize := True;
	Chart.PaneWidth[True] := 0;
	with Columns do
	begin
		Add('And others ...');
		with (IUnknown(Add('')) as EXG2ANTTLib_TLB.Column) do
		begin
			HTMLCaption := 'First Column';
			HeaderVertical := True;
			Width := 36;
			AllowSizing := False;
			Def[EXG2ANTTLib_TLB.exCellHasCheckBox] := OleVariant(True);
			Def[EXG2ANTTLib_TLB.exCellPaddingLeft] := OleVariant(8);
			Position := 0;
		end;
		with (IUnknown(Add('')) as EXG2ANTTLib_TLB.Column) do
		begin
			HTMLCaption := '<c><b>Second Column';
			HeaderVertical := True;
			Width := 36;
			AllowSizing := False;
			Def[EXG2ANTTLib_TLB.exCellHasCheckBox] := OleVariant(True);
			Def[EXG2ANTTLib_TLB.exCellPaddingLeft] := OleVariant(8);
			Position := 1;
		end;
		with (IUnknown(Add('')) as EXG2ANTTLib_TLB.Column) do
		begin
			HTMLCaption := '<r>Third Column';
			HeaderVertical := True;
			Width := 36;
			AllowSizing := False;
			Def[EXG2ANTTLib_TLB.exCellHasCheckBox] := OleVariant(True);
			Def[EXG2ANTTLib_TLB.exCellPaddingLeft] := OleVariant(8);
			Position := 2;
		end;
	end;
	with Items do
	begin
		CellState[OleVariant(AddItem('Item 1')),OleVariant(3)] := 1;
		CellState[OleVariant(AddItem('Item 2')),OleVariant(2)] := 1;
		CellState[OleVariant(AddItem('Item 3')),OleVariant(1)] := 1;
	end;
	EndUpdate();
end
1954
Can I display the column's multiple-lines caption vertically oriented (method 1)

with G2antt1 do
begin
	BeginUpdate();
	HeaderHeight := 48;
	HeaderSingleLine := False;
	ColumnAutoResize := True;
	Chart.PaneWidth[True] := 0;
	with Columns do
	begin
		Add('And others ...');
		with (IUnknown(Add('First Column')) as EXG2ANTTLib_TLB.Column) do
		begin
			HeaderVertical := True;
			Width := 36;
			AllowSizing := False;
			Def[EXG2ANTTLib_TLB.exCellHasCheckBox] := OleVariant(True);
			Def[EXG2ANTTLib_TLB.exCellPaddingLeft] := OleVariant(8);
			Position := 0;
		end;
		with (IUnknown(Add('Second Column')) as EXG2ANTTLib_TLB.Column) do
		begin
			HeaderBold := True;
			HeaderVertical := True;
			Width := 36;
			AllowSizing := False;
			Def[EXG2ANTTLib_TLB.exCellHasCheckBox] := OleVariant(True);
			Def[EXG2ANTTLib_TLB.exCellPaddingLeft] := OleVariant(8);
			Position := 1;
		end;
		with (IUnknown(Add('Third Column')) as EXG2ANTTLib_TLB.Column) do
		begin
			HeaderVertical := True;
			Width := 36;
			AllowSizing := False;
			Def[EXG2ANTTLib_TLB.exCellHasCheckBox] := OleVariant(True);
			Def[EXG2ANTTLib_TLB.exCellPaddingLeft] := OleVariant(8);
			Position := 2;
		end;
	end;
	with Items do
	begin
		CellState[OleVariant(AddItem('Item 1')),OleVariant(3)] := 1;
		CellState[OleVariant(AddItem('Item 2')),OleVariant(2)] := 1;
		CellState[OleVariant(AddItem('Item 3')),OleVariant(1)] := 1;
	end;
	EndUpdate();
end
1953
Can I display the column's caption vertically oriented (method 2)

with G2antt1 do
begin
	BeginUpdate();
	HeaderHeight := 48;
	ColumnAutoResize := True;
	Chart.PaneWidth[True] := 0;
	with Columns do
	begin
		Add('And others ...');
		with (IUnknown(Add('')) as EXG2ANTTLib_TLB.Column) do
		begin
			HTMLCaption := 'First';
			HeaderVertical := True;
			Width := 20;
			AllowSizing := False;
			Def[EXG2ANTTLib_TLB.exCellHasCheckBox] := OleVariant(True);
			Position := 0;
		end;
		with (IUnknown(Add('')) as EXG2ANTTLib_TLB.Column) do
		begin
			HTMLCaption := '<c><b>Second';
			HeaderVertical := True;
			Width := 20;
			AllowSizing := False;
			Def[EXG2ANTTLib_TLB.exCellHasCheckBox] := OleVariant(True);
			Position := 1;
		end;
		with (IUnknown(Add('')) as EXG2ANTTLib_TLB.Column) do
		begin
			HTMLCaption := '<r>Third';
			HeaderVertical := True;
			Width := 20;
			AllowSizing := False;
			Def[EXG2ANTTLib_TLB.exCellHasCheckBox] := OleVariant(True);
			Position := 2;
		end;
	end;
	with Items do
	begin
		CellState[OleVariant(AddItem('Item 1')),OleVariant(3)] := 1;
		CellState[OleVariant(AddItem('Item 2')),OleVariant(2)] := 1;
		CellState[OleVariant(AddItem('Item 3')),OleVariant(1)] := 1;
	end;
	EndUpdate();
end
1952
Can I display the column's caption vertically oriented (method 1)

with G2antt1 do
begin
	BeginUpdate();
	HeaderHeight := 48;
	ColumnAutoResize := True;
	Chart.PaneWidth[True] := 0;
	with Columns do
	begin
		Add('And others ...');
		with (IUnknown(Add('First')) as EXG2ANTTLib_TLB.Column) do
		begin
			HeaderVertical := True;
			Width := 20;
			AllowSizing := False;
			Def[EXG2ANTTLib_TLB.exCellHasCheckBox] := OleVariant(True);
			Position := 0;
		end;
		with (IUnknown(Add('Second')) as EXG2ANTTLib_TLB.Column) do
		begin
			HeaderBold := True;
			HeaderVertical := True;
			Width := 20;
			AllowSizing := False;
			Def[EXG2ANTTLib_TLB.exCellHasCheckBox] := OleVariant(True);
			Position := 1;
		end;
		with (IUnknown(Add('Third')) as EXG2ANTTLib_TLB.Column) do
		begin
			HeaderVertical := True;
			Width := 20;
			AllowSizing := False;
			Def[EXG2ANTTLib_TLB.exCellHasCheckBox] := OleVariant(True);
			Position := 2;
		end;
	end;
	with Items do
	begin
		CellState[OleVariant(AddItem('Item 1')),OleVariant(3)] := 1;
		CellState[OleVariant(AddItem('Item 2')),OleVariant(2)] := 1;
		CellState[OleVariant(AddItem('Item 3')),OleVariant(1)] := 1;
	end;
	EndUpdate();
end
1951
How can I resize all task-bars 0-length

with G2antt1 do
begin
	BeginUpdate();
	Columns.Add('Tasks');
	with Chart do
	begin
		FirstVisibleDate := '8/1/2017';
		LevelCount := 2;
		PaneWidth[False] := 128;
	end;
	with Items do
	begin
		AddBar(AddItem('Task 1'),'Task','8/2/2017','8/6/2017',Null,Null);
		AddBar(AddItem('Task 2'),'Task','8/3/2017','8/3/2017',Null,Null);
		AddBar(AddItem('Task 3'),'Task','8/4/2017','8/13/2017',Null,Null);
		AddBar(AddItem('Task 4'),'Task','8/5/2017','8/5/2017',Null,Null);
		ItemBarEx['itembar(513) = 0 and itembar(0) = `Task`',EXG2ANTTLib_TLB.exBarColor] := OleVariant(255);
		ItemBarEx['itembar(513) = 0 and itembar(0) = `Task`',EXG2ANTTLib_TLB.exBarDuration] := 'value + 1';
	end;
	EndUpdate();
end
1950
Is it possible to mark items that holds items with 0-length (zero,empty, sample 3)
with G2antt1 do
begin
	BeginUpdate();
	Columns.Add('Tasks');
	with (IUnknown(Columns.Add('Duration')) as EXG2ANTTLib_TLB.Column) do
	begin
		Def[EXG2ANTTLib_TLB.exCellValueToItemBarProperty] := OleVariant(513);
		Visible := False;
	end;
	with Chart do
	begin
		FirstVisibleDate := '8/1/2017';
		LevelCount := 2;
		PaneWidth[False] := 128;
	end;
	with ConditionalFormats.Add('%1 = 0',Null) do
	begin
		Bold := True;
		BackColor := $bebebe;
		ChartBackColor := BackColor;
	end;
	with Items do
	begin
		AllowCellValueToItemBar := True;
		AddBar(AddItem('Task 1'),'Task','8/2/2017','8/6/2017',Null,Null);
		AddBar(AddItem('Task 2'),'Task','8/3/2017','8/3/2017',Null,Null);
		AddBar(AddItem('Task 3'),'Task','8/4/2017','8/13/2017',Null,Null);
		AddBar(AddItem('Task 4'),'Task','8/5/2017','8/5/2017',Null,Null);
	end;
	EndUpdate();
end
1949
Is it possible to mark items that holds items with 0-length (zero,empty, sample 2)

with G2antt1 do
begin
	BeginUpdate();
	Columns.Add('Tasks');
	with Chart do
	begin
		FirstVisibleDate := '8/1/2017';
		LevelCount := 2;
		PaneWidth[False] := 128;
	end;
	with Items do
	begin
		AddBar(AddItem('Task 1'),'Task','8/2/2017','8/6/2017',Null,Null);
		AddBar(AddItem('Task 2'),'Task','8/3/2017','8/3/2017',Null,Null);
		AddBar(AddItem('Task 3'),'Task','8/4/2017','8/13/2017',Null,Null);
		AddBar(AddItem('Task 4'),'Task','8/5/2017','8/5/2017',Null,Null);
		ItemBarEx['itembar(513) = 0',EXG2ANTTLib_TLB.exBarCaption] := '`zero-length`';
	end;
	EndUpdate();
end
1948
Is it possible to mark items that holds items with 0-length (zero,empty, sample 1)

with G2antt1 do
begin
	BeginUpdate();
	Columns.Add('Tasks');
	with Chart do
	begin
		FirstVisibleDate := '8/1/2017';
		LevelCount := 2;
		PaneWidth[False] := 128;
	end;
	with Items do
	begin
		AddBar(AddItem('Task 1'),'Task','8/2/2017','8/6/2017',Null,Null);
		AddBar(AddItem('Task 2'),'Task','8/3/2017','8/3/2017',Null,Null);
		AddBar(AddItem('Task 3'),'Task','8/4/2017','8/13/2017',Null,Null);
		AddBar(AddItem('Task 4'),'Task','8/5/2017','8/5/2017',Null,Null);
		ItemBarEx['itembar(513) = 0',EXG2ANTTLib_TLB.exBarBackgroundExt] := '`[frame=RGB(255,0,0),framethick,pattern=6,patterncolor=RGB(255,0,0)]`';
		ItemBarEx['itembar(513) = 0',EXG2ANTTLib_TLB.exBarBackgroundExtInflate] := '`-4,-4,4,4`';
	end;
	EndUpdate();
end
1947
How can I find how many tasks/bars of 0-length (zero,empty) do I have

with G2antt1 do
begin
	BeginUpdate();
	Columns.Add('Tasks');
	with Chart do
	begin
		FirstVisibleDate := '8/1/2017';
		LevelCount := 2;
		PaneWidth[False] := 128;
	end;
	with Items do
	begin
		AddBar(AddItem('Task 1'),'Task','8/2/2017','8/6/2017',Null,Null);
		AddBar(AddItem('Task 2'),'Task','8/3/2017','8/3/2017',Null,Null);
		AddBar(AddItem('Task 3'),'Task','8/4/2017','8/13/2017',Null,Null);
		AddBar(AddItem('Task 4'),'Task','8/5/2017','8/5/2017',Null,Null);
		OutputDebugString( ItemBarEx['itembar(513) = 0',EXG2ANTTLib_TLB.exBarsCount] );
	end;
	EndUpdate();
end
1946
How can I remove all bars from selected items

with G2antt1 do
begin
	BeginUpdate();
	SingleSel := False;
	Columns.Add('Tasks');
	with Chart do
	begin
		FirstVisibleDate := '8/1/2017';
		LevelCount := 2;
		PaneWidth[False] := 128;
		SelBackColor := $f0f0f0;
		with Bars.Item['Task'] do
		begin
			OverlaidType := EXG2ANTTLib_TLB.exOverlaidBarsStack;
			OverlaidGroup := 'Task,Task-Diff';
			Def[EXG2ANTTLib_TLB.exBarCaption] := '<font ;6><%=%0%>';
			Def[EXG2ANTTLib_TLB.exBarHAlignCaption] := OleVariant(18);
		end;
		with Bars.Copy('Task','Task-Diff') do
		begin
			Height := 4;
			Color := $ff;
			Def[EXG2ANTTLib_TLB.exBarCaption] := '<font ;6><%=%0%>';
			Def[EXG2ANTTLib_TLB.exBarHAlignCaption] := OleVariant(16);
		end;
	end;
	with Items do
	begin
		AddBar(AddItem('Task 1'),'Task','8/2/2017','8/6/2017',Null,Null);
		h := AddItem('Task 2');
		AddBar(h,'Task','8/3/2017','8/9/2017',Null,Null);
		SelectItem[h] := True;
		h := AddItem('Task 3');
		AddBar(h,'Task','8/4/2017','8/13/2017','',Null);
		AddBar(h,'Task-Diff','8/5/2017','8/14/2017','P',Null);
		SelectItem[h] := True;
		AddBar(AddItem('Task 4'),'Task','8/5/2017','8/16/2017',Null,Null);
		OutputDebugString( 'Bars before remove: ' );
		OutputDebugString( ItemBar[0,'<*>',EXG2ANTTLib_TLB.exBarsCount] );
		ItemBarEx['itemisselected',EXG2ANTTLib_TLB.exBarKey] := '`toberemove` + value ';
		RemoveBar(0,'<toberemove*>');
		OutputDebugString( 'Bars after remove: ' );
		OutputDebugString( ItemBar[0,'<*>',EXG2ANTTLib_TLB.exBarsCount] );
	end;
	EndUpdate();
end
1945
How can I remove task bars from selected items

with G2antt1 do
begin
	BeginUpdate();
	SingleSel := False;
	Columns.Add('Tasks');
	with Chart do
	begin
		FirstVisibleDate := '8/1/2017';
		LevelCount := 2;
		PaneWidth[False] := 128;
		SelBackColor := $f0f0f0;
		with Bars.Item['Task'] do
		begin
			OverlaidType := EXG2ANTTLib_TLB.exOverlaidBarsStack;
			OverlaidGroup := 'Task,Task-Diff';
			Def[EXG2ANTTLib_TLB.exBarCaption] := '<font ;6><%=%0%>';
			Def[EXG2ANTTLib_TLB.exBarHAlignCaption] := OleVariant(18);
		end;
		with Bars.Copy('Task','Task-Diff') do
		begin
			Height := 4;
			Color := $ff;
			Def[EXG2ANTTLib_TLB.exBarCaption] := '<font ;6><%=%0%>';
			Def[EXG2ANTTLib_TLB.exBarHAlignCaption] := OleVariant(16);
		end;
	end;
	with Items do
	begin
		AddBar(AddItem('Task 1'),'Task','8/2/2017','8/6/2017',Null,Null);
		h := AddItem('Task 2');
		AddBar(h,'Task','8/3/2017','8/9/2017',Null,Null);
		SelectItem[h] := True;
		h := AddItem('Task 3');
		AddBar(h,'Task','8/4/2017','8/13/2017','',Null);
		AddBar(h,'Task-Diff','8/5/2017','8/14/2017','P',Null);
		SelectItem[h] := True;
		AddBar(AddItem('Task 4'),'Task','8/5/2017','8/16/2017',Null,Null);
		OutputDebugString( 'Bars before remove: ' );
		OutputDebugString( ItemBar[0,'<*>',EXG2ANTTLib_TLB.exBarsCount] );
		ItemBarEx['itemisselected and itembar(0) = `Task`',EXG2ANTTLib_TLB.exBarKey] := '`toberemove` + value ';
		RemoveBar(0,'<toberemove*>');
		OutputDebugString( 'Bars after remove: ' );
		OutputDebugString( ItemBar[0,'<*>',EXG2ANTTLib_TLB.exBarsCount] );
	end;
	EndUpdate();
end
1944
How can I change the pattern for some bars only

with G2antt1 do
begin
	BeginUpdate();
	(IUnknown(Columns.Add('Tasks')) as EXG2ANTTLib_TLB.Column).Def[EXG2ANTTLib_TLB.exCellHasCheckBox] := OleVariant(True);
	with Chart do
	begin
		FirstVisibleDate := '8/1/2017';
		LevelCount := 2;
		PaneWidth[False] := 128;
	end;
	with Items do
	begin
		AddBar(AddItem('Task 1'),'Task','8/2/2017','8/6/2017',Null,Null);
		h := AddItem('Task 2');
		AddBar(h,'Task','8/3/2017','8/9/2017',Null,Null);
		CellState[OleVariant(h),OleVariant(0)] := 1;
		h := AddItem('Task 3');
		AddBar(h,'Task','8/4/2017','8/13/2017',Null,Null);
		CellState[OleVariant(h),OleVariant(0)] := 1;
		AddBar(AddItem('Task 4'),'Task','8/5/2017','8/16/2017',Null,Null);
		ItemBarEx['cellstate(0)',EXG2ANTTLib_TLB.exBarPattern] := OleVariant(6);
	end;
	EndUpdate();
end
1943
How do I apply the same effort to all bars

with G2antt1 do
begin
	BeginUpdate();
	Columns.Add('Tasks');
	with Chart do
	begin
		FirstVisibleDate := '8/1/2017';
		LevelCount := 2;
		PaneWidth[False] := 128;
		HistogramView := EXG2ANTTLib_TLB.exHistogramAllItems;
		HistogramVisible := True;
		HistogramHeight := 64;
		with Bars.Item['Task'] do
		begin
			HistogramPattern := EXG2ANTTLib_TLB.exPatternBDiagonal;
			HistogramType := EXG2ANTTLib_TLB.exHistOverAllocation;
		end;
	end;
	with Items do
	begin
		AddBar(AddItem('Task 1'),'Task','8/2/2017','8/6/2017',Null,Null);
		AddBar(AddItem('Task 2'),'Task','8/3/2017','8/9/2017',Null,Null);
		AddBar(AddItem('Task 3'),'Task','8/4/2017','8/13/2017',Null,Null);
		AddBar(AddItem('Task 4'),'Task','8/5/2017','8/16/2017',Null,Null);
		ItemBarEx[OleVariant(True),EXG2ANTTLib_TLB.exBarEffort] := OleVariant(2);
	end;
	EndUpdate();
end
1942
How do I apply the same percent to all bars

with G2antt1 do
begin
	BeginUpdate();
	Columns.Add('Tasks');
	with Chart do
	begin
		FirstVisibleDate := '8/1/2017';
		LevelCount := 2;
		PaneWidth[False] := 128;
		with Bars.Add('Task%Progress') do
		begin
			Shortcut := 'Task';
			Def[EXG2ANTTLib_TLB.exBarShowPercentCaption] := OleVariant(True);
		end;
	end;
	with Items do
	begin
		AddBar(AddItem('Task 1'),'Task','8/2/2017','8/6/2017',Null,Null);
		AddBar(AddItem('Task 2'),'Task','8/3/2017','8/9/2017',Null,Null);
		AddBar(AddItem('Task 3'),'Task','8/4/2017','8/13/2017',Null,Null);
		AddBar(AddItem('Task 4'),'Task','8/5/2017','8/16/2017',Null,Null);
		ItemBarEx[OleVariant(True),EXG2ANTTLib_TLB.exBarPercent] := OleVariant(0.5);
	end;
	EndUpdate();
end
1941
How can I set the same duration for all bars

with G2antt1 do
begin
	BeginUpdate();
	Columns.Add('Tasks');
	with Chart do
	begin
		FirstVisibleDate := '8/1/2017';
		LevelCount := 2;
		PaneWidth[False] := 128;
	end;
	with Items do
	begin
		AddBar(AddItem('Task 1'),'Task','8/2/2017','8/6/2017',Null,Null);
		AddBar(AddItem('Task 2'),'Task','8/3/2017','8/9/2017',Null,Null);
		AddBar(AddItem('Task 3'),'Task','8/4/2017','8/13/2017',Null,Null);
		AddBar(AddItem('Task 4'),'Task','8/5/2017','8/16/2017',Null,Null);
		ItemBarEx[OleVariant(True),EXG2ANTTLib_TLB.exBarDuration] := OleVariant(4);
	end;
	EndUpdate();
end
1940
How do I move all bars to end at the same date-time

with G2antt1 do
begin
	BeginUpdate();
	Columns.Add('Tasks');
	with Chart do
	begin
		FirstVisibleDate := '8/1/2017';
		LevelCount := 2;
		PaneWidth[False] := 128;
	end;
	with Items do
	begin
		AddBar(AddItem('Task 1'),'Task','8/2/2017','8/6/2017',Null,Null);
		AddBar(AddItem('Task 2'),'Task','8/3/2017','8/9/2017',Null,Null);
		AddBar(AddItem('Task 3'),'Task','8/4/2017','8/13/2017',Null,Null);
		AddBar(AddItem('Task 4'),'Task','8/5/2017','8/16/2017',Null,Null);
		ItemBarEx[OleVariant(True),EXG2ANTTLib_TLB.exBarMoveEnd] := '#8/15/2017#';
	end;
	EndUpdate();
end
1939
How do I move all bars to start at the same date-time

with G2antt1 do
begin
	BeginUpdate();
	Columns.Add('Tasks');
	with Chart do
	begin
		FirstVisibleDate := '8/1/2017';
		LevelCount := 2;
		PaneWidth[False] := 128;
	end;
	with Items do
	begin
		AddBar(AddItem('Task 1'),'Task','8/2/2017','8/6/2017',Null,Null);
		AddBar(AddItem('Task 2'),'Task','8/3/2017','8/9/2017',Null,Null);
		AddBar(AddItem('Task 3'),'Task','8/4/2017','8/13/2017',Null,Null);
		AddBar(AddItem('Task 4'),'Task','8/5/2017','8/16/2017',Null,Null);
		ItemBarEx[OleVariant(True),EXG2ANTTLib_TLB.exBarMoveStart] := '#8/2/2017#';
	end;
	EndUpdate();
end
1938
How do I apply a new color for some bars, while others should be shown with a different color

with G2antt1 do
begin
	BeginUpdate();
	Columns.Add('Tasks');
	with Chart do
	begin
		FirstVisibleDate := '8/1/2017';
		LevelCount := 2;
		PaneWidth[False] := 128;
		SelBackColor := $f0f0f0;
		with Bars.Item['Task'] do
		begin
			OverlaidType := EXG2ANTTLib_TLB.exOverlaidBarsStack;
			OverlaidGroup := 'Task,Task-Diff';
			Def[EXG2ANTTLib_TLB.exBarCaption] := '<font ;6><%=%0%>';
			Def[EXG2ANTTLib_TLB.exBarHAlignCaption] := OleVariant(18);
		end;
		with Bars.Copy('Task','Task-Diff') do
		begin
			Height := 4;
			Color := $ff;
			Def[EXG2ANTTLib_TLB.exBarCaption] := '<font ;6><%=%0%>';
			Def[EXG2ANTTLib_TLB.exBarHAlignCaption] := OleVariant(16);
		end;
	end;
	with Items do
	begin
		AddBar(AddItem('Task 1'),'Task','8/2/2017','8/6/2017',Null,Null);
		AddBar(AddItem('Task 2'),'Task','8/3/2017','8/9/2017',Null,Null);
		h := AddItem('Task 3');
		AddBar(h,'Task','8/4/2017','8/13/2017','',Null);
		AddBar(h,'Task-Diff','8/5/2017','8/14/2017','P',Null);
		AddBar(AddItem('Task 4'),'Task','8/5/2017','8/16/2017',Null,Null);
		ItemBarEx[OleVariant(True),EXG2ANTTLib_TLB.exBarColor] := 'cellcaption(0) like `*2` ? 0x0000FF : 0x00FF00';
	end;
	EndUpdate();
end
1937
How do I hide some bars, and show others

with G2antt1 do
begin
	BeginUpdate();
	SingleSel := False;
	Columns.Add('Tasks');
	with Chart do
	begin
		FirstVisibleDate := '8/1/2017';
		LevelCount := 2;
		PaneWidth[False] := 128;
		SelBackColor := $f0f0f0;
		with Bars.Item['Task'] do
		begin
			OverlaidType := EXG2ANTTLib_TLB.exOverlaidBarsStack;
			OverlaidGroup := 'Task,Task-Diff';
			Def[EXG2ANTTLib_TLB.exBarCaption] := '<font ;6><%=%0%>';
			Def[EXG2ANTTLib_TLB.exBarHAlignCaption] := OleVariant(18);
		end;
		with Bars.Copy('Task','Task-Diff') do
		begin
			Height := 4;
			Color := $ff;
			Def[EXG2ANTTLib_TLB.exBarCaption] := '<font ;6><%=%0%>';
			Def[EXG2ANTTLib_TLB.exBarHAlignCaption] := OleVariant(16);
		end;
	end;
	with Items do
	begin
		AddBar(AddItem('Task 1'),'Task','8/2/2017','8/6/2017',Null,Null);
		h := AddItem('Task 2');
		AddBar(h,'Task','8/3/2017','8/9/2017',Null,Null);
		SelectItem[h] := True;
		h := AddItem('Task 3');
		AddBar(h,'Task','8/4/2017','8/13/2017','',Null);
		AddBar(h,'Task-Diff','8/5/2017','8/14/2017','P',Null);
		SelectItem[h] := True;
		AddBar(AddItem('Task 4'),'Task','8/5/2017','8/16/2017',Null,Null);
		ItemBarEx['-1',EXG2ANTTLib_TLB.exBarTransparent] := 'itembar(0) = `Task` ? 0 : 100';
	end;
	EndUpdate();
end
1936
I like how ItemBarEx works, the question is how can I remove the bars based on the same criteria

with G2antt1 do
begin
	BeginUpdate();
	Columns.Add('Tasks');
	with Chart do
	begin
		FirstVisibleDate := '8/1/2017';
		LevelCount := 2;
		PaneWidth[False] := 128;
	end;
	with Items do
	begin
		AddBar(AddItem('Task 1'),'Task','8/2/2017','8/6/2017',Null,Null);
		AddBar(AddItem('Task 2'),'Task','8/3/2017','8/9/2017',Null,Null);
		AddBar(AddItem('Task 3'),'Task','8/4/2017','8/13/2017',Null,Null);
		AddBar(AddItem('Task 4'),'Task','8/5/2017','8/16/2017',Null,Null);
		OutputDebugString( 'Bars before remove: ' );
		OutputDebugString( ItemBar[0,'<*>',EXG2ANTTLib_TLB.exBarsCount] );
		ItemBarEx['cellcaption(0) like `*2 *3`',EXG2ANTTLib_TLB.exBarKey] := '`toberemove` + value ';
		RemoveBar(0,'<toberemove*>');
		OutputDebugString( 'Bars after remove: ' );
		OutputDebugString( ItemBar[0,'<*>',EXG2ANTTLib_TLB.exBarsCount] );
	end;
	EndUpdate();
end
1935
Is it possible to automatically color the bar being checked

// CellStateChanged event - Fired after cell's state has been changed.
procedure TForm1.G2antt1CellStateChanged(ASender: TObject; Item : HITEM;ColIndex : Integer);
begin
end;

with G2antt1 do
begin
	BeginUpdate();
	SelBackMode := EXG2ANTTLib_TLB.exTransparent;
	with Chart do
	begin
		LevelCount := 2;
		PaneWidth[False] := 256;
		FirstVisibleDate := '1/1/2017';
	end;
	with ConditionalFormats.Add('%CS0','check') do
	begin
		Bold := True;
		ApplyToBars := 'Task';
		BarColor := $10000;
	end;
	with (IUnknown(Columns.Add('Items')) as EXG2ANTTLib_TLB.Column) do
	begin
		Def[EXG2ANTTLib_TLB.exCellHasCheckBox] := OleVariant(True);
		Width := 256;
	end;
	(IUnknown(Columns.Add(G2antt1.ConditionalFormats.Item['check'].Expression)) as EXG2ANTTLib_TLB.Column).FormatColumn := G2antt1.ConditionalFormats.Item['check'].Expression;
	with Items do
	begin
		AddBar(AddItem('Item 1'),'Task','1/2/2017','1/12/2017',Null,Null);
		h := AddItem('Item 2');
		AddBar(h,'Task','1/3/2017','1/13/2017',Null,Null);
		CellState[OleVariant(h),OleVariant(0)] := 1;
		h := AddItem('Item 3');
		AddBar(h,'Task','1/4/2017','1/14/2017',Null,Null);
		CellState[OleVariant(h),OleVariant(0)] := 1;
	end;
	EndUpdate();
end
1934
How do I automatically bold items being checked

// CellStateChanged event - Fired after cell's state has been changed.
procedure TForm1.G2antt1CellStateChanged(ASender: TObject; Item : HITEM;ColIndex : Integer);
begin
end;

with G2antt1 do
begin
	BeginUpdate();
	SelBackMode := EXG2ANTTLib_TLB.exTransparent;
	Chart.PaneWidth[True] := 0;
	with ConditionalFormats.Add('%CS0','check') do
	begin
		Bold := True;
	end;
	(IUnknown(Columns.Add('Items')) as EXG2ANTTLib_TLB.Column).Def[EXG2ANTTLib_TLB.exCellHasCheckBox] := OleVariant(True);
	(IUnknown(Columns.Add(G2antt1.ConditionalFormats.Item['check'].Expression)) as EXG2ANTTLib_TLB.Column).FormatColumn := G2antt1.ConditionalFormats.Item['check'].Expression;
	with Items do
	begin
		AddItem('Item 1');
		CellState[OleVariant(AddItem('Item 2')),OleVariant(0)] := 1;
		AddItem('Item 3');
	end;
	EndUpdate();
end
1933
Can I display the radio-button with a solid color

with G2antt1 do
begin
	BeginUpdate();
	Chart.PaneWidth[True] := 0;
	RadioImage[False] := 32699122;
	RadioImage[True] := 16777216;
	(IUnknown(Columns.Add('Check')) as EXG2ANTTLib_TLB.Column).Def[EXG2ANTTLib_TLB.exCellHasRadioButton] := OleVariant(True);
	with Items do
	begin
		AddItem('Radio 1');
		CellState[OleVariant(AddItem('Radio 2')),OleVariant(0)] := 1;
		AddItem('Radio 1');
	end;
	EndUpdate();
end
1932
Can I display the check-box with a solid color

with G2antt1 do
begin
	BeginUpdate();
	Chart.PaneWidth[True] := 0;
	CheckImage[EXG2ANTTLib_TLB.Unchecked] := 32699122;
	CheckImage[EXG2ANTTLib_TLB.Checked] := 16777216;
	(IUnknown(Columns.Add('Check')) as EXG2ANTTLib_TLB.Column).Def[EXG2ANTTLib_TLB.exCellHasCheckBox] := OleVariant(True);
	with Items do
	begin
		AddItem('Check 1');
		CellState[OleVariant(AddItem('Check 2')),OleVariant(0)] := 1;
		AddItem('Check 3');
	end;
	EndUpdate();
end
1931
How can I use the CellState with ConditionalFormat/ComputedField/FormatColumn

// CellStateChanged event - Fired after cell's state has been changed.
procedure TForm1.G2antt1CellStateChanged(ASender: TObject; Item : HITEM;ColIndex : Integer);
begin
end;

with G2antt1 do
begin
	BeginUpdate();
	LinesAtRoot := EXG2ANTTLib_TLB.exGroupLinesInsideLeaf;
	SelBackMode := EXG2ANTTLib_TLB.exTransparent;
	Chart.PaneWidth[True] := 0;
	with (IUnknown(Columns.Add('Items')) as EXG2ANTTLib_TLB.Column) do
	begin
		Def[EXG2ANTTLib_TLB.exCellHasCheckBox] := OleVariant(True);
		PartialCheck := True;
	end;
	with (IUnknown(Columns.Add('Format')) as EXG2ANTTLib_TLB.Column) do
	begin
		FormatColumn := '%CS0';
		Caption := FormatColumn;
		Def[EXG2ANTTLib_TLB.exCellForeColor] := OleVariant(8421504);
		Def[EXG2ANTTLib_TLB.exHeaderForeColor] := Def[EXG2ANTTLib_TLB.exCellForeColor];
	end;
	with Items do
	begin
		h := AddItem('Root');
		InsertItem(h,Null,'Item 1');
		CellState[OleVariant(InsertItem(h,Null,'Item 2')),OleVariant(0)] := 1;
		CellState[OleVariant(InsertItem(h,Null,'Item 3')),OleVariant(0)] := 1;
		ExpandItem[h] := True;
	end;
	EndUpdate();
end
1930
How can I use the CellData with ConditionalFormat/ComputedField/FormatColumn

with G2antt1 do
begin
	BeginUpdate();
	Chart.PaneWidth[True] := 0;
	Columns.Add('Items');
	with (IUnknown(Columns.Add('Format')) as EXG2ANTTLib_TLB.Column) do
	begin
		FormatColumn := '%CD0';
		Caption := FormatColumn;
		Def[EXG2ANTTLib_TLB.exCellForeColor] := OleVariant(8421504);
		Def[EXG2ANTTLib_TLB.exHeaderForeColor] := Def[EXG2ANTTLib_TLB.exCellForeColor];
	end;
	with Items do
	begin
		CellData[OleVariant(AddItem('Item 1')),OleVariant(0)] := OleVariant(1234);
		CellData[OleVariant(AddItem('Item 2')),OleVariant(0)] := 'this is just an user data';
		CellData[OleVariant(AddItem('Item 3')),OleVariant(0)] := '1/1/2001';
	end;
	EndUpdate();
end
1929
How can I use the CellValue/CellCaption with ConditionalFormat/ComputedField/FormatColumn

with G2antt1 do
begin
	BeginUpdate();
	Chart.PaneWidth[True] := 0;
	with (IUnknown(Columns.Add('Items')) as EXG2ANTTLib_TLB.Column) do
	begin
		with Editor do
		begin
			EditType := EXG2ANTTLib_TLB.DropDownListType;
			AddItem(1,'Item 1',Null);
			AddItem(2,'Item 2',Null);
			AddItem(3,'Item 3',Null);
		end;
	end;
	with (IUnknown(Columns.Add('Format')) as EXG2ANTTLib_TLB.Column) do
	begin
		FormatColumn := '%0';
		Caption := FormatColumn;
		Def[EXG2ANTTLib_TLB.exCellForeColor] := OleVariant(8421504);
		Def[EXG2ANTTLib_TLB.exHeaderForeColor] := Def[EXG2ANTTLib_TLB.exCellForeColor];
		AllowSizing := False;
	end;
	with (IUnknown(Columns.Add('Format')) as EXG2ANTTLib_TLB.Column) do
	begin
		FormatColumn := '%C0';
		Caption := FormatColumn;
		Def[EXG2ANTTLib_TLB.exCellForeColor] := OleVariant(8421504);
		Def[EXG2ANTTLib_TLB.exHeaderForeColor] := Def[EXG2ANTTLib_TLB.exCellForeColor];
		AllowSizing := False;
	end;
	with Items do
	begin
		AddItem(OleVariant(1));
		CellValue[OleVariant(AddItem(OleVariant(0))),OleVariant(0)] := OleVariant(2);
		AddItem(OleVariant(2));
	end;
	EndUpdate();
end
1928
How can I use the ShowNonworkingHours property (hide the non-working hours)

with G2antt1 do
begin
	BeginUpdate();
	with Chart do
	begin
		PaneWidth[False] := 0;
		LevelCount := 2;
		UnitScale := EXG2ANTTLib_TLB.exHour;
		NonworkingHours := 16253183;
		ShowNonworkingHours := False;
		ShowNonworkingUnits := False;
	end;
	EndUpdate();
end
1927
How can I use the ShowNonworkingDates property (hide the non-working days)

with G2antt1 do
begin
	BeginUpdate();
	with Chart do
	begin
		PaneWidth[False] := 0;
		LevelCount := 2;
		UnitScale := EXG2ANTTLib_TLB.exDay;
		ShowNonworkingDates := False;
		ShowNonworkingUnits := False;
	end;
	EndUpdate();
end
1926
How can I show/hide bars once the user checks or un-checks a column

// CellStateChanged event - Fired after cell's state has been changed.
procedure TForm1.G2antt1CellStateChanged(ASender: TObject; Item : HITEM;ColIndex : Integer);
begin
	with G2antt1 do
	begin
		with Items do
		begin
			ItemBarEx[OleVariant(True),EXG2ANTTLib_TLB.exBarTransparent] := 'cellstate(0) = 1 ? 0 : 100';
		end;
	end
end;

with G2antt1 do
begin
	BeginUpdate();
	LinesAtRoot := EXG2ANTTLib_TLB.exLinesAtRoot;
	with (IUnknown(Columns.Add('Tasks')) as EXG2ANTTLib_TLB.Column) do
	begin
		Def[EXG2ANTTLib_TLB.exCellHasCheckBox] := OleVariant(True);
		PartialCheck := True;
	end;
	HeaderVisible := EXG2ANTTLib_TLB.exHeaderVisibleExtendLevels;
	SelBackColor := RGB(240,240,240);
	SelForeColor := RGB(0,0,0);
	with Chart do
	begin
		FirstVisibleDate := '8/1/2017';
		LevelCount := 2;
		PaneWidth[False] := 128;
		with Bars.Item['Summary'] do
		begin
			StartShape := EXG2ANTTLib_TLB.exShapeIconEmpty;
			EndShape := EXG2ANTTLib_TLB.exShapeIconEmpty;
			Shape := EXG2ANTTLib_TLB.exShapeThinDown;
		end;
		SelBackColor := G2antt1.SelBackColor;
		SelBarColor := $808080;
	end;
	with Items do
	begin
		h := AddItem('Project');
		hChild := InsertItem(h,Null,'Task 1');
		AddBar(hChild,'Task','8/2/2017','8/8/2017',Null,Null);
		SelectItem[hChild] := True;
		hChild := InsertItem(h,Null,'Task 2');
		AddBar(hChild,'Task','8/3/2017','8/10/2017',Null,Null);
		CellState[OleVariant(hChild),OleVariant(0)] := 1;
		hChild := InsertItem(h,Null,'Task 3');
		AddBar(hChild,'Task','8/4/2017','8/12/2017',Null,Null);
		AddBar(h,'Summary','8/1/2017','8/1/2017','sum',Null);
		DefineSummaryBars(h,'sum',-3,'');
		ExpandItem[h] := True;
		ItemBarEx[OleVariant(True),EXG2ANTTLib_TLB.exBarTransparent] := 'cellstate(0) = 1 ? 0 : 100';
	end;
	EndUpdate();
end
1925
How can I change the color for all Task bars

with G2antt1 do
begin
	BeginUpdate();
	LinesAtRoot := EXG2ANTTLib_TLB.exLinesAtRoot;
	with (IUnknown(Columns.Add('Tasks')) as EXG2ANTTLib_TLB.Column) do
	begin
		Def[EXG2ANTTLib_TLB.exCellHasCheckBox] := OleVariant(True);
		PartialCheck := True;
	end;
	HeaderVisible := EXG2ANTTLib_TLB.exHeaderVisibleExtendLevels;
	SelBackColor := RGB(240,240,240);
	SelForeColor := RGB(0,0,0);
	with Chart do
	begin
		FirstVisibleDate := '8/1/2017';
		LevelCount := 2;
		PaneWidth[False] := 128;
		with Bars.Item['Summary'] do
		begin
			StartShape := EXG2ANTTLib_TLB.exShapeIconEmpty;
			EndShape := EXG2ANTTLib_TLB.exShapeIconEmpty;
			Shape := EXG2ANTTLib_TLB.exShapeThinDown;
		end;
		SelBackColor := G2antt1.SelBackColor;
		SelBarColor := $808080;
	end;
	with Items do
	begin
		h := AddItem('Project');
		hChild := InsertItem(h,Null,'Task 1');
		AddBar(hChild,'Task','8/2/2017','8/8/2017',Null,Null);
		SelectItem[hChild] := True;
		hChild := InsertItem(h,Null,'Task 2');
		AddBar(hChild,'Task','8/3/2017','8/10/2017',Null,Null);
		CellState[OleVariant(hChild),OleVariant(0)] := 1;
		hChild := InsertItem(h,Null,'Task 3');
		AddBar(hChild,'Task','8/4/2017','8/12/2017',Null,Null);
		CellState[OleVariant(hChild),OleVariant(0)] := 1;
		AddBar(h,'Summary','8/1/2017','8/1/2017','sum',Null);
		DefineSummaryBars(h,'sum',-3,'');
		ExpandItem[h] := True;
		ItemBarEx['itembar(0) = `Task`',EXG2ANTTLib_TLB.exBarColor] := OleVariant(65280);
	end;
	EndUpdate();
end
1924
Is it possible to automatically select bars only when user selects a new item

// SelectionChanged event - Fired after a new item has been selected.
procedure TForm1.G2antt1SelectionChanged(ASender: TObject; );
begin
	with G2antt1 do
	begin
		with Items do
		begin
			ItemBarEx[OleVariant(True),EXG2ANTTLib_TLB.exBarSelected] := 'itemisselected';
		end;
	end
end;

with G2antt1 do
begin
	BeginUpdate();
	LinesAtRoot := EXG2ANTTLib_TLB.exLinesAtRoot;
	Columns.Add('Tasks');
	HeaderVisible := EXG2ANTTLib_TLB.exHeaderVisibleExtendLevels;
	SelBackColor := RGB(240,240,240);
	SelForeColor := RGB(0,0,0);
	with Chart do
	begin
		AllowSelectObjects := EXG2ANTTLib_TLB.exNoSelectObjects;
		FirstVisibleDate := '8/1/2017';
		LevelCount := 2;
		PaneWidth[False] := 128;
		with Bars.Item['Summary'] do
		begin
			StartShape := EXG2ANTTLib_TLB.exShapeIconEmpty;
			EndShape := EXG2ANTTLib_TLB.exShapeIconEmpty;
			Shape := EXG2ANTTLib_TLB.exShapeThinDown;
		end;
		SelBackColor := G2antt1.SelBackColor;
		SelBarColor := $808080;
	end;
	with Items do
	begin
		h := AddItem('Project');
		hChild := InsertItem(h,Null,'Task 1');
		AddBar(hChild,'Task','8/2/2017','8/8/2017',Null,Null);
		SelectItem[hChild] := True;
		hChild := InsertItem(h,Null,'Task 2');
		AddBar(hChild,'Task','8/3/2017','8/10/2017',Null,Null);
		CellState[OleVariant(hChild),OleVariant(0)] := 1;
		hChild := InsertItem(h,Null,'Task 3');
		AddBar(hChild,'Task','8/4/2017','8/12/2017',Null,Null);
		CellState[OleVariant(hChild),OleVariant(0)] := 1;
		AddBar(h,'Summary','8/1/2017','8/1/2017','sum',Null);
		DefineSummaryBars(h,'sum',-3,'');
		ExpandItem[h] := True;
	end;
	EndUpdate();
end
1923
Is it possible to automatically select bars only when the user clicks the column's checkbox

// CellStateChanged event - Fired after cell's state has been changed.
procedure TForm1.G2antt1CellStateChanged(ASender: TObject; Item : HITEM;ColIndex : Integer);
begin
	with G2antt1 do
	begin
		with Items do
		begin
			ItemBarEx[OleVariant(True),EXG2ANTTLib_TLB.exBarSelected] := 'cellstate(0) = 1';
		end;
	end
end;

with G2antt1 do
begin
	BeginUpdate();
	LinesAtRoot := EXG2ANTTLib_TLB.exLinesAtRoot;
	with (IUnknown(Columns.Add('Tasks')) as EXG2ANTTLib_TLB.Column) do
	begin
		Def[EXG2ANTTLib_TLB.exCellHasCheckBox] := OleVariant(True);
		PartialCheck := True;
	end;
	HeaderVisible := EXG2ANTTLib_TLB.exHeaderVisibleExtendLevels;
	SelBackColor := RGB(240,240,240);
	SelForeColor := RGB(0,0,0);
	with Chart do
	begin
		AllowSelectObjects := EXG2ANTTLib_TLB.exNoSelectObjects;
		FirstVisibleDate := '8/1/2017';
		LevelCount := 2;
		PaneWidth[False] := 128;
		with Bars.Item['Summary'] do
		begin
			StartShape := EXG2ANTTLib_TLB.exShapeIconEmpty;
			EndShape := EXG2ANTTLib_TLB.exShapeIconEmpty;
			Shape := EXG2ANTTLib_TLB.exShapeThinDown;
		end;
		SelBackColor := G2antt1.SelBackColor;
		SelBarColor := $808080;
	end;
	with Items do
	begin
		h := AddItem('Project');
		hChild := InsertItem(h,Null,'Task 1');
		AddBar(hChild,'Task','8/2/2017','8/8/2017',Null,Null);
		SelectItem[hChild] := True;
		hChild := InsertItem(h,Null,'Task 2');
		AddBar(hChild,'Task','8/3/2017','8/10/2017',Null,Null);
		CellState[OleVariant(hChild),OleVariant(0)] := 1;
		hChild := InsertItem(h,Null,'Task 3');
		AddBar(hChild,'Task','8/4/2017','8/12/2017',Null,Null);
		CellState[OleVariant(hChild),OleVariant(0)] := 1;
		AddBar(h,'Summary','8/1/2017','8/1/2017','sum',Null);
		DefineSummaryBars(h,'sum',-3,'');
		ExpandItem[h] := True;
	end;
	EndUpdate();
end
1922
How do I select all bars on leaf items

with G2antt1 do
begin
	BeginUpdate();
	LinesAtRoot := EXG2ANTTLib_TLB.exLinesAtRoot;
	with (IUnknown(Columns.Add('Tasks')) as EXG2ANTTLib_TLB.Column) do
	begin
		Def[EXG2ANTTLib_TLB.exCellHasCheckBox] := OleVariant(True);
		PartialCheck := True;
	end;
	HeaderVisible := EXG2ANTTLib_TLB.exHeaderVisibleExtendLevels;
	SelBackColor := RGB(240,240,240);
	SelForeColor := RGB(0,0,0);
	with Chart do
	begin
		FirstVisibleDate := '8/1/2017';
		LevelCount := 2;
		PaneWidth[False] := 128;
		with Bars.Item['Summary'] do
		begin
			StartShape := EXG2ANTTLib_TLB.exShapeIconEmpty;
			EndShape := EXG2ANTTLib_TLB.exShapeIconEmpty;
			Shape := EXG2ANTTLib_TLB.exShapeThinDown;
		end;
		SelBackColor := G2antt1.SelBackColor;
		SelBarColor := $808080;
	end;
	with Items do
	begin
		h := AddItem('Project');
		hChild := InsertItem(h,Null,'Task 1');
		AddBar(hChild,'Task','8/2/2017','8/8/2017',Null,Null);
		SelectItem[hChild] := True;
		hChild := InsertItem(h,Null,'Task 2');
		AddBar(hChild,'Task','8/3/2017','8/10/2017',Null,Null);
		CellState[OleVariant(hChild),OleVariant(0)] := 1;
		hChild := InsertItem(h,Null,'Task 3');
		AddBar(hChild,'Task','8/4/2017','8/12/2017',Null,Null);
		CellState[OleVariant(hChild),OleVariant(0)] := 1;
		AddBar(h,'Summary','8/1/2017','8/1/2017','sum',Null);
		DefineSummaryBars(h,'sum',-3,'');
		ExpandItem[h] := True;
		ItemBarEx['itemlevel = 1',EXG2ANTTLib_TLB.exBarSelected] := OleVariant(True);
	end;
	EndUpdate();
end
1921
How can I change the caption for all checked Task bars

with G2antt1 do
begin
	BeginUpdate();
	LinesAtRoot := EXG2ANTTLib_TLB.exLinesAtRoot;
	with (IUnknown(Columns.Add('Tasks')) as EXG2ANTTLib_TLB.Column) do
	begin
		Def[EXG2ANTTLib_TLB.exCellHasCheckBox] := OleVariant(True);
		PartialCheck := True;
	end;
	HeaderVisible := EXG2ANTTLib_TLB.exHeaderVisibleExtendLevels;
	SelBackColor := RGB(240,240,240);
	SelForeColor := RGB(0,0,0);
	with Chart do
	begin
		FirstVisibleDate := '8/1/2017';
		LevelCount := 2;
		PaneWidth[False] := 128;
		with Bars.Item['Summary'] do
		begin
			StartShape := EXG2ANTTLib_TLB.exShapeIconEmpty;
			EndShape := EXG2ANTTLib_TLB.exShapeIconEmpty;
			Shape := EXG2ANTTLib_TLB.exShapeThinDown;
		end;
		SelBackColor := G2antt1.SelBackColor;
		SelBarColor := $808080;
	end;
	with Items do
	begin
		h := AddItem('Project');
		hChild := InsertItem(h,Null,'Task 1');
		AddBar(hChild,'Task','8/2/2017','8/8/2017',Null,Null);
		SelectItem[hChild] := True;
		hChild := InsertItem(h,Null,'Task 2');
		AddBar(hChild,'Task','8/3/2017','8/10/2017',Null,Null);
		CellState[OleVariant(hChild),OleVariant(0)] := 1;
		hChild := InsertItem(h,Null,'Task 3');
		AddBar(hChild,'Task','8/4/2017','8/12/2017',Null,Null);
		CellState[OleVariant(hChild),OleVariant(0)] := 1;
		AddBar(h,'Summary','8/1/2017','8/1/2017','sum',Null);
		DefineSummaryBars(h,'sum',-3,'');
		ExpandItem[h] := True;
		ItemBarEx['(cellstate(0) = 1) and (itembar(0) = `Task`)',EXG2ANTTLib_TLB.exBarCaption] := '`new caption`';
	end;
	EndUpdate();
end
1920
How can I change the caption for all Task bars

with G2antt1 do
begin
	BeginUpdate();
	LinesAtRoot := EXG2ANTTLib_TLB.exLinesAtRoot;
	with (IUnknown(Columns.Add('Tasks')) as EXG2ANTTLib_TLB.Column) do
	begin
		Def[EXG2ANTTLib_TLB.exCellHasCheckBox] := OleVariant(True);
		PartialCheck := True;
	end;
	HeaderVisible := EXG2ANTTLib_TLB.exHeaderVisibleExtendLevels;
	SelBackColor := RGB(240,240,240);
	SelForeColor := RGB(0,0,0);
	with Chart do
	begin
		FirstVisibleDate := '8/1/2017';
		LevelCount := 2;
		PaneWidth[False] := 128;
		with Bars.Item['Summary'] do
		begin
			StartShape := EXG2ANTTLib_TLB.exShapeIconEmpty;
			EndShape := EXG2ANTTLib_TLB.exShapeIconEmpty;
			Shape := EXG2ANTTLib_TLB.exShapeThinDown;
		end;
		SelBackColor := G2antt1.SelBackColor;
		SelBarColor := $808080;
	end;
	with Items do
	begin
		h := AddItem('Project');
		hChild := InsertItem(h,Null,'Task 1');
		AddBar(hChild,'Task','8/2/2017','8/8/2017',Null,Null);
		SelectItem[hChild] := True;
		hChild := InsertItem(h,Null,'Task 2');
		AddBar(hChild,'Task','8/3/2017','8/10/2017',Null,Null);
		CellState[OleVariant(hChild),OleVariant(0)] := 1;
		hChild := InsertItem(h,Null,'Task 3');
		AddBar(hChild,'Task','8/4/2017','8/12/2017',Null,Null);
		CellState[OleVariant(hChild),OleVariant(0)] := 1;
		AddBar(h,'Summary','8/1/2017','8/1/2017','sum',Null);
		DefineSummaryBars(h,'sum',-3,'');
		ExpandItem[h] := True;
		ItemBarEx['(itembar(0) = `Task`)',EXG2ANTTLib_TLB.exBarCaption] := '`new caption`';
	end;
	EndUpdate();
end
1919
How can I change the caption for all bars

with G2antt1 do
begin
	BeginUpdate();
	LinesAtRoot := EXG2ANTTLib_TLB.exLinesAtRoot;
	with (IUnknown(Columns.Add('Tasks')) as EXG2ANTTLib_TLB.Column) do
	begin
		Def[EXG2ANTTLib_TLB.exCellHasCheckBox] := OleVariant(True);
		PartialCheck := True;
	end;
	HeaderVisible := EXG2ANTTLib_TLB.exHeaderVisibleExtendLevels;
	SelBackColor := RGB(240,240,240);
	SelForeColor := RGB(0,0,0);
	with Chart do
	begin
		FirstVisibleDate := '8/1/2017';
		LevelCount := 2;
		PaneWidth[False] := 128;
		with Bars.Item['Summary'] do
		begin
			StartShape := EXG2ANTTLib_TLB.exShapeIconEmpty;
			EndShape := EXG2ANTTLib_TLB.exShapeIconEmpty;
			Shape := EXG2ANTTLib_TLB.exShapeThinDown;
		end;
		SelBackColor := G2antt1.SelBackColor;
		SelBarColor := $808080;
	end;
	with Items do
	begin
		h := AddItem('Project');
		hChild := InsertItem(h,Null,'Task 1');
		AddBar(hChild,'Task','8/2/2017','8/8/2017',Null,Null);
		SelectItem[hChild] := True;
		hChild := InsertItem(h,Null,'Task 2');
		AddBar(hChild,'Task','8/3/2017','8/10/2017',Null,Null);
		CellState[OleVariant(hChild),OleVariant(0)] := 1;
		hChild := InsertItem(h,Null,'Task 3');
		AddBar(hChild,'Task','8/4/2017','8/12/2017',Null,Null);
		CellState[OleVariant(hChild),OleVariant(0)] := 1;
		AddBar(h,'Summary','8/1/2017','8/1/2017','sum',Null);
		DefineSummaryBars(h,'sum',-3,'');
		ExpandItem[h] := True;
		ItemBarEx[OleVariant(True),EXG2ANTTLib_TLB.exBarCaption] := '`new caption`';
	end;
	EndUpdate();
end
1918
How can I move all Task bars to end at the same date time

with G2antt1 do
begin
	BeginUpdate();
	LinesAtRoot := EXG2ANTTLib_TLB.exLinesAtRoot;
	with (IUnknown(Columns.Add('Tasks')) as EXG2ANTTLib_TLB.Column) do
	begin
		Def[EXG2ANTTLib_TLB.exCellHasCheckBox] := OleVariant(True);
		PartialCheck := True;
	end;
	HeaderVisible := EXG2ANTTLib_TLB.exHeaderVisibleExtendLevels;
	SelBackColor := RGB(240,240,240);
	SelForeColor := RGB(0,0,0);
	with Chart do
	begin
		FirstVisibleDate := '8/1/2017';
		LevelCount := 2;
		PaneWidth[False] := 128;
		with Bars.Item['Summary'] do
		begin
			StartShape := EXG2ANTTLib_TLB.exShapeIconEmpty;
			EndShape := EXG2ANTTLib_TLB.exShapeIconEmpty;
			Shape := EXG2ANTTLib_TLB.exShapeThinDown;
		end;
		SelBackColor := G2antt1.SelBackColor;
		SelBarColor := $808080;
	end;
	with Items do
	begin
		h := AddItem('Project');
		hChild := InsertItem(h,Null,'Task 1');
		AddBar(hChild,'Task','8/2/2017','8/8/2017',Null,Null);
		SelectItem[hChild] := True;
		hChild := InsertItem(h,Null,'Task 2');
		AddBar(hChild,'Task','8/3/2017','8/10/2017',Null,Null);
		CellState[OleVariant(hChild),OleVariant(0)] := 1;
		hChild := InsertItem(h,Null,'Task 3');
		AddBar(hChild,'Task','8/4/2017','8/12/2017',Null,Null);
		CellState[OleVariant(hChild),OleVariant(0)] := 1;
		AddBar(h,'Summary','8/1/2017','8/1/2017','sum',Null);
		DefineSummaryBars(h,'sum',-3,'');
		ExpandItem[h] := True;
		ItemBarEx['(itembar(0) = `Task`)',EXG2ANTTLib_TLB.exBarMove] := '#8/14/2017# - itembar(2)';
	end;
	EndUpdate();
end
1917
How can I move all Task bars to start at the same date time

with G2antt1 do
begin
	BeginUpdate();
	LinesAtRoot := EXG2ANTTLib_TLB.exLinesAtRoot;
	with (IUnknown(Columns.Add('Tasks')) as EXG2ANTTLib_TLB.Column) do
	begin
		Def[EXG2ANTTLib_TLB.exCellHasCheckBox] := OleVariant(True);
		PartialCheck := True;
	end;
	HeaderVisible := EXG2ANTTLib_TLB.exHeaderVisibleExtendLevels;
	SelBackColor := RGB(240,240,240);
	SelForeColor := RGB(0,0,0);
	with Chart do
	begin
		FirstVisibleDate := '8/1/2017';
		LevelCount := 2;
		PaneWidth[False] := 128;
		with Bars.Item['Summary'] do
		begin
			StartShape := EXG2ANTTLib_TLB.exShapeIconEmpty;
			EndShape := EXG2ANTTLib_TLB.exShapeIconEmpty;
			Shape := EXG2ANTTLib_TLB.exShapeThinDown;
		end;
		SelBackColor := G2antt1.SelBackColor;
		SelBarColor := $808080;
	end;
	with Items do
	begin
		h := AddItem('Project');
		hChild := InsertItem(h,Null,'Task 1');
		AddBar(hChild,'Task','8/2/2017','8/8/2017',Null,Null);
		SelectItem[hChild] := True;
		hChild := InsertItem(h,Null,'Task 2');
		AddBar(hChild,'Task','8/3/2017','8/10/2017',Null,Null);
		CellState[OleVariant(hChild),OleVariant(0)] := 1;
		hChild := InsertItem(h,Null,'Task 3');
		AddBar(hChild,'Task','8/4/2017','8/12/2017',Null,Null);
		CellState[OleVariant(hChild),OleVariant(0)] := 1;
		AddBar(h,'Summary','8/1/2017','8/1/2017','sum',Null);
		DefineSummaryBars(h,'sum',-3,'');
		ExpandItem[h] := True;
		ItemBarEx['(itembar(0) = `Task`)',EXG2ANTTLib_TLB.exBarMove] := '#8/3/2017# - itembar(1)';
	end;
	EndUpdate();
end
1916
How can I change the color for checked Task bars

with G2antt1 do
begin
	BeginUpdate();
	LinesAtRoot := EXG2ANTTLib_TLB.exLinesAtRoot;
	with (IUnknown(Columns.Add('Tasks')) as EXG2ANTTLib_TLB.Column) do
	begin
		Def[EXG2ANTTLib_TLB.exCellHasCheckBox] := OleVariant(True);
		PartialCheck := True;
	end;
	HeaderVisible := EXG2ANTTLib_TLB.exHeaderVisibleExtendLevels;
	SelBackColor := RGB(240,240,240);
	SelForeColor := RGB(0,0,0);
	with Chart do
	begin
		FirstVisibleDate := '8/1/2017';
		LevelCount := 2;
		PaneWidth[False] := 128;
		with Bars.Item['Summary'] do
		begin
			StartShape := EXG2ANTTLib_TLB.exShapeIconEmpty;
			EndShape := EXG2ANTTLib_TLB.exShapeIconEmpty;
			Shape := EXG2ANTTLib_TLB.exShapeThinDown;
		end;
		SelBackColor := G2antt1.SelBackColor;
		SelBarColor := $808080;
	end;
	with Items do
	begin
		h := AddItem('Project');
		hChild := InsertItem(h,Null,'Task 1');
		AddBar(hChild,'Task','8/2/2017','8/8/2017',Null,Null);
		SelectItem[hChild] := True;
		hChild := InsertItem(h,Null,'Task 2');
		AddBar(hChild,'Task','8/3/2017','8/10/2017',Null,Null);
		CellState[OleVariant(hChild),OleVariant(0)] := 1;
		hChild := InsertItem(h,Null,'Task 3');
		AddBar(hChild,'Task','8/4/2017','8/12/2017',Null,Null);
		CellState[OleVariant(hChild),OleVariant(0)] := 1;
		AddBar(h,'Summary','8/1/2017','8/1/2017','sum',Null);
		DefineSummaryBars(h,'sum',-3,'');
		ExpandItem[h] := True;
		ItemBarEx['cellstate(0) = 1 and itembar(0) = `Task`',EXG2ANTTLib_TLB.exBarColor] := OleVariant(255);
	end;
	EndUpdate();
end
1915
How do I resize all Task bars programatically

with G2antt1 do
begin
	BeginUpdate();
	LinesAtRoot := EXG2ANTTLib_TLB.exLinesAtRoot;
	with (IUnknown(Columns.Add('Tasks')) as EXG2ANTTLib_TLB.Column) do
	begin
		Def[EXG2ANTTLib_TLB.exCellHasCheckBox] := OleVariant(True);
		PartialCheck := True;
	end;
	HeaderVisible := EXG2ANTTLib_TLB.exHeaderVisibleExtendLevels;
	SelBackColor := RGB(240,240,240);
	SelForeColor := RGB(0,0,0);
	with Chart do
	begin
		FirstVisibleDate := '8/1/2017';
		LevelCount := 2;
		PaneWidth[False] := 128;
		with Bars.Item['Summary'] do
		begin
			StartShape := EXG2ANTTLib_TLB.exShapeIconEmpty;
			EndShape := EXG2ANTTLib_TLB.exShapeIconEmpty;
			Shape := EXG2ANTTLib_TLB.exShapeThinDown;
		end;
		SelBackColor := G2antt1.SelBackColor;
		SelBarColor := $808080;
	end;
	with Items do
	begin
		h := AddItem('Project');
		hChild := InsertItem(h,Null,'Task 1');
		AddBar(hChild,'Task','8/2/2017','8/8/2017',Null,Null);
		SelectItem[hChild] := True;
		hChild := InsertItem(h,Null,'Task 2');
		AddBar(hChild,'Task','8/3/2017','8/10/2017',Null,Null);
		CellState[OleVariant(hChild),OleVariant(0)] := 1;
		hChild := InsertItem(h,Null,'Task 3');
		AddBar(hChild,'Task','8/4/2017','8/12/2017',Null,Null);
		CellState[OleVariant(hChild),OleVariant(0)] := 1;
		AddBar(h,'Summary','8/1/2017','8/1/2017','sum',Null);
		DefineSummaryBars(h,'sum',-3,'');
		ExpandItem[h] := True;
		ItemBarEx['itembar(0) = `Task`',EXG2ANTTLib_TLB.exBarEnd] := 'value + 2';
	end;
	EndUpdate();
end
1914
How do I move just the checked Task bars in the chart

with G2antt1 do
begin
	BeginUpdate();
	LinesAtRoot := EXG2ANTTLib_TLB.exLinesAtRoot;
	with (IUnknown(Columns.Add('Tasks')) as EXG2ANTTLib_TLB.Column) do
	begin
		Def[EXG2ANTTLib_TLB.exCellHasCheckBox] := OleVariant(True);
		PartialCheck := True;
	end;
	HeaderVisible := EXG2ANTTLib_TLB.exHeaderVisibleExtendLevels;
	SelBackColor := RGB(240,240,240);
	SelForeColor := RGB(0,0,0);
	with Chart do
	begin
		FirstVisibleDate := '8/1/2017';
		LevelCount := 2;
		PaneWidth[False] := 128;
		with Bars.Item['Summary'] do
		begin
			StartShape := EXG2ANTTLib_TLB.exShapeIconEmpty;
			EndShape := EXG2ANTTLib_TLB.exShapeIconEmpty;
			Shape := EXG2ANTTLib_TLB.exShapeThinDown;
		end;
		SelBackColor := G2antt1.SelBackColor;
		SelBarColor := $808080;
	end;
	with Items do
	begin
		h := AddItem('Project');
		hChild := InsertItem(h,Null,'Task 1');
		AddBar(hChild,'Task','8/2/2017','8/8/2017',Null,Null);
		SelectItem[hChild] := True;
		hChild := InsertItem(h,Null,'Task 2');
		AddBar(hChild,'Task','8/3/2017','8/10/2017',Null,Null);
		CellState[OleVariant(hChild),OleVariant(0)] := 1;
		hChild := InsertItem(h,Null,'Task 3');
		AddBar(hChild,'Task','8/4/2017','8/12/2017',Null,Null);
		CellState[OleVariant(hChild),OleVariant(0)] := 1;
		AddBar(h,'Summary','8/1/2017','8/1/2017','sum',Null);
		DefineSummaryBars(h,'sum',-3,'');
		ExpandItem[h] := True;
		ItemBarEx['cellstate(0) = 1 and itembar(0) = `Task`',EXG2ANTTLib_TLB.exBarMove] := OleVariant(-2);
	end;
	EndUpdate();
end
1913
How do I move all Task bars in the chart

with G2antt1 do
begin
	BeginUpdate();
	LinesAtRoot := EXG2ANTTLib_TLB.exLinesAtRoot;
	with (IUnknown(Columns.Add('Tasks')) as EXG2ANTTLib_TLB.Column) do
	begin
		Def[EXG2ANTTLib_TLB.exCellHasCheckBox] := OleVariant(True);
		PartialCheck := True;
	end;
	HeaderVisible := EXG2ANTTLib_TLB.exHeaderVisibleExtendLevels;
	SelBackColor := RGB(240,240,240);
	SelForeColor := RGB(0,0,0);
	with Chart do
	begin
		FirstVisibleDate := '8/1/2017';
		LevelCount := 2;
		PaneWidth[False] := 128;
		with Bars.Item['Summary'] do
		begin
			StartShape := EXG2ANTTLib_TLB.exShapeIconEmpty;
			EndShape := EXG2ANTTLib_TLB.exShapeIconEmpty;
			Shape := EXG2ANTTLib_TLB.exShapeThinDown;
		end;
		SelBackColor := G2antt1.SelBackColor;
		SelBarColor := $808080;
	end;
	with Items do
	begin
		h := AddItem('Project');
		hChild := InsertItem(h,Null,'Task 1');
		AddBar(hChild,'Task','8/2/2017','8/8/2017',Null,Null);
		SelectItem[hChild] := True;
		hChild := InsertItem(h,Null,'Task 2');
		AddBar(hChild,'Task','8/3/2017','8/10/2017',Null,Null);
		CellState[OleVariant(hChild),OleVariant(0)] := 1;
		hChild := InsertItem(h,Null,'Task 3');
		AddBar(hChild,'Task','8/4/2017','8/12/2017',Null,Null);
		CellState[OleVariant(hChild),OleVariant(0)] := 1;
		AddBar(h,'Summary','8/1/2017','8/1/2017','sum',Null);
		DefineSummaryBars(h,'sum',-3,'');
		ExpandItem[h] := True;
		ItemBarEx['itembar(0) = `Task`',EXG2ANTTLib_TLB.exBarMove] := OleVariant(1);
	end;
	EndUpdate();
end
1912
How do I count all Task bars in the chart
with G2antt1 do
begin
	BeginUpdate();
	LinesAtRoot := EXG2ANTTLib_TLB.exLinesAtRoot;
	Columns.Add('Tasks');
	HeaderVisible := EXG2ANTTLib_TLB.exHeaderVisibleExtendLevels;
	SelBackColor := RGB(240,240,240);
	SelForeColor := RGB(0,0,0);
	with Chart do
	begin
		FirstVisibleDate := '8/1/2017';
		LevelCount := 2;
		PaneWidth[False] := 128;
		with Bars.Item['Summary'] do
		begin
			StartShape := EXG2ANTTLib_TLB.exShapeIconEmpty;
			EndShape := EXG2ANTTLib_TLB.exShapeIconEmpty;
			Shape := EXG2ANTTLib_TLB.exShapeThinDown;
		end;
		SelBackColor := G2antt1.SelBackColor;
		SelBarColor := $808080;
	end;
	with Items do
	begin
		h := AddItem('Project');
		hChild := InsertItem(h,Null,'Task 1');
		AddBar(hChild,'Task','8/2/2017','8/8/2017',Null,Null);
		hChild := InsertItem(h,Null,'Task 2');
		AddBar(hChild,'Task','8/3/2017','8/10/2017',Null,Null);
		hChild := InsertItem(h,Null,'Task 3');
		AddBar(hChild,'Task','8/4/2017','8/12/2017',Null,Null);
		AddBar(h,'Summary','8/1/2017','8/1/2017','sum',Null);
		DefineSummaryBars(h,'sum',-3,'');
		ExpandItem[h] := True;
		OutputDebugString( ItemBarEx['itembar(0) = `Task`',EXG2ANTTLib_TLB.exBarsCount] );
	end;
	EndUpdate();
end
1911
How do I select bars whose items are checked

with G2antt1 do
begin
	BeginUpdate();
	LinesAtRoot := EXG2ANTTLib_TLB.exLinesAtRoot;
	with (IUnknown(Columns.Add('Tasks')) as EXG2ANTTLib_TLB.Column) do
	begin
		Def[EXG2ANTTLib_TLB.exCellHasCheckBox] := OleVariant(True);
		PartialCheck := True;
	end;
	HeaderVisible := EXG2ANTTLib_TLB.exHeaderVisibleExtendLevels;
	SelBackColor := RGB(240,240,240);
	SelForeColor := RGB(0,0,0);
	with Chart do
	begin
		FirstVisibleDate := '8/1/2017';
		LevelCount := 2;
		PaneWidth[False] := 128;
		with Bars.Item['Summary'] do
		begin
			StartShape := EXG2ANTTLib_TLB.exShapeIconEmpty;
			EndShape := EXG2ANTTLib_TLB.exShapeIconEmpty;
			Shape := EXG2ANTTLib_TLB.exShapeThinDown;
		end;
		SelBackColor := G2antt1.SelBackColor;
		SelBarColor := $808080;
	end;
	with Items do
	begin
		h := AddItem('Project');
		hChild := InsertItem(h,Null,'Task 1');
		AddBar(hChild,'Task','8/2/2017','8/8/2017',Null,Null);
		SelectItem[hChild] := True;
		hChild := InsertItem(h,Null,'Task 2');
		AddBar(hChild,'Task','8/3/2017','8/10/2017',Null,Null);
		CellState[OleVariant(hChild),OleVariant(0)] := 1;
		hChild := InsertItem(h,Null,'Task 3');
		AddBar(hChild,'Task','8/4/2017','8/12/2017',Null,Null);
		CellState[OleVariant(hChild),OleVariant(0)] := 1;
		AddBar(h,'Summary','8/1/2017','8/1/2017','sum',Null);
		DefineSummaryBars(h,'sum',-3,'');
		ExpandItem[h] := True;
		ItemBarEx['cellstate(0) = 1',EXG2ANTTLib_TLB.exBarSelected] := OleVariant(True);
	end;
	EndUpdate();
end
1910
How can I select all bars, where a specified column matches a specified criteria

with G2antt1 do
begin
	BeginUpdate();
	Columns.Add('Task');
	Chart.FirstVisibleDate := '1/1/2001';
	Chart.PaneWidth[False] := 48;
	Chart.SelBarColor := $ff;
	with Items do
	begin
		h := AddItem('Task 1');
		AddBar(h,'Task','1/2/2001','1/4/2001','K1','K1');
		AddBar(h,'Task','1/5/2001','1/7/2001','K2','K2');
		AddBar(h,'Task','1/8/2001','1/10/2001','P','P');
		AddBar(AddItem('Task 2'),'Task','1/2/2001','1/4/2001','Q','Q');
		AddBar(AddItem('Task 4'),'Task','1/2/2001','1/4/2001','M','M');
		ItemBarEx['cellcaption(0) = `Task 1`',EXG2ANTTLib_TLB.exBarSelected] := OleVariant(True);
	end;
	EndUpdate();
end
1909
How can I select/unselect all bars

with G2antt1 do
begin
	BeginUpdate();
	Columns.Add('Task');
	Chart.FirstVisibleDate := '1/1/2001';
	Chart.PaneWidth[False] := 48;
	Chart.SelBarColor := $ff;
	with Items do
	begin
		h := AddItem('Task 1');
		AddBar(h,'Task','1/2/2001','1/4/2001','K1','K1');
		AddBar(h,'Task','1/5/2001','1/7/2001','K2','K2');
		AddBar(h,'Task','1/8/2001','1/10/2001','P','P');
		AddBar(AddItem('Task 2'),'Task','1/2/2001','1/4/2001','Q','Q');
		AddBar(AddItem('Task 4'),'Task','1/2/2001','1/4/2001','M','M');
		ItemBarEx[OleVariant(True),EXG2ANTTLib_TLB.exBarSelected] := OleVariant(True);
	end;
	EndUpdate();
end
1908
Is it possible to set the background color of the chart for one item and one day
with G2antt1 do
begin
	BeginUpdate();
	Columns.Add('Items');
	with Chart do
	begin
		LevelCount := 2;
		PaneWidth[False] := 96;
		FirstVisibleDate := '1/1/2001';
	end;
	with Items do
	begin
		AddItem('Item');
		h := AddItem('Item');
		AddBar(h,'','1/2/2001','1/3/2001','Back',' ');
		ItemBar[h,'Back',EXG2ANTTLib_TLB.exBarBackColor] := OleVariant(255);
		ItemBar[h,'Back',EXG2ANTTLib_TLB.exBarSelectable] := OleVariant(False);
		AddItem('Item');
	end;
	EndUpdate();
end
1907
It is possible to search for an item ( inside the Editor ), case insensitive

with G2antt1 do
begin
	BeginUpdate();
	with (IUnknown(Columns.Add('DropDownList')) as EXG2ANTTLib_TLB.Column).Editor do
	begin
		EditType := EXG2ANTTLib_TLB.DropDownListType;
		AddItem(1,'One',Null);
		AddItem(2,'Two',Null);
		AddItem(3,'Three',Null);
	end;
	with Items do
	begin
		AddItem(G2antt1.Columns.Item[OleVariant(0)].Editor.FindItem['>ONE']);
		AddItem(G2antt1.Columns.Item[OleVariant(0)].Editor.FindItem['>ThRee']);
		AddItem(G2antt1.Columns.Item[OleVariant(0)].Editor.FindItem['ONE']);
		AddItem(G2antt1.Columns.Item[OleVariant(0)].Editor.FindItem['>tWo']);
	end;
	EndUpdate();
end
1906
The text after the BR-tag is in same line as the text before the BR-tag (entire column)

with G2antt1 do
begin
	BeginUpdate();
	DrawGridLines := EXG2ANTTLib_TLB.exHLines;
	Chart.PaneWidth[True] := 0;
	with (IUnknown(Columns.Add('Default')) as EXG2ANTTLib_TLB.Column) do
	begin
		Def[EXG2ANTTLib_TLB.exCellValueFormat] := OleVariant(1);
		Def[EXG2ANTTLib_TLB.exCellSingleLine] := OleVariant(False);
	end;
	with Items do
	begin
		AddItem('This is the first line.<br>This is the second line.');
		AddItem('This is the first line.<br>This is the second line.');
		AddItem('This is the first line.<br>This is the second line.');
	end;
	EndUpdate();
end
1905
The text after the BR-tag is in same line as the text before the BR-tag (individual)

with G2antt1 do
begin
	BeginUpdate();
	DrawGridLines := EXG2ANTTLib_TLB.exHLines;
	Chart.PaneWidth[True] := 0;
	Columns.Add('Default');
	with Items do
	begin
		CellValueFormat[OleVariant(AddItem('This is the first line.<br>This is the second line.')),OleVariant(0)] := EXG2ANTTLib_TLB.exHTML;
		h := AddItem('<b>This is the first line.<br>This is the second line.</b>');
		CellValueFormat[OleVariant(h),OleVariant(0)] := EXG2ANTTLib_TLB.exHTML;
		CellSingleLine[OleVariant(h),OleVariant(0)] := EXG2ANTTLib_TLB.exCaptionWordWrap;
		CellValueFormat[OleVariant(AddItem('This is the first line.<br>This is the second line.')),OleVariant(0)] := EXG2ANTTLib_TLB.exHTML;
	end;
	EndUpdate();
end
1904
How do I prevent showing the control's BackColorAlternate property on empty / non-items part of the control

with G2antt1 do
begin
	BeginUpdate();
	DrawGridLines := EXG2ANTTLib_TLB.exAllLines;
	with Chart do
	begin
		DrawGridLines := EXG2ANTTLib_TLB.exAllLines;
		LevelCount := 2;
		PaneWidth[False] := 128;
		FirstVisibleDate := '1/1/2001';
	end;
	BackColorAlternate := $7ff0f0f0;
	BackColorLevelHeader := BackColor;
	Columns.Add('Column');
	with Items do
	begin
		AddBar(AddItem('Item 1'),'Task','1/2/2001','1/12/2001',Null,Null);
		AddBar(AddItem('Item 2'),'Task','1/3/2001','1/13/2001',Null,Null);
		AddBar(AddItem('Item 3'),'Task','1/2/2001','1/12/2001',Null,Null);
		AddBar(AddItem('Item 4'),'Task','1/3/2001','1/13/2001',Null,Null);
		AddBar(AddItem('Item 5'),'Task','1/2/2001','1/12/2001',Null,Null);
	end;
	EndUpdate();
end
1903
Can I disable an item once the user selects a new value into a different item

// Change event - Occurs when the user changes the cell's content.
procedure TForm1.G2antt1Change(ASender: TObject; Item : HITEM;ColIndex : Integer;var NewValue : OleVariant);
begin
	with G2antt1 do
	begin
		with Items do
		begin
			EnableItem[ItemByIndex[1]] := False;
		end;
	end
end;

with G2antt1 do
begin
	FreezeEvents(True);
	BeginUpdate();
	Chart.PaneWidth[True] := 0;
	ScrollBySingleLine := True;
	DrawGridLines := EXG2ANTTLib_TLB.exRowLines;
	Columns.Add('Q');
	Columns.Add('A');
	with Items do
	begin
		h1 := AddItem('What''s your gender?');
		with CellEditor[OleVariant(h1),OleVariant(1)] do
		begin
			EditType := EXG2ANTTLib_TLB.DropDownListType;
			AddItem(1,'Male',Null);
			AddItem(0,'Female',Null);
		end;
		CellValue[OleVariant(h1),OleVariant(1)] := OleVariant(1);
		h2 := AddItem('What''s pet name?');
		CellValue[OleVariant(h2),OleVariant(1)] := 'This is my pet favorite long long long name, that shoul break the line in multiple pieces';
		CellSingleLine[OleVariant(h2),OleVariant(1)] := EXG2ANTTLib_TLB.exCaptionWordWrap;
	end;
	EndUpdate();
	FreezeEvents(False);
end
1902
How can I get a row expanded / enlarged to fit the cell's text (entire column)

with G2antt1 do
begin
	BeginUpdate();
	Chart.PaneWidth[True] := 0;
	ScrollBySingleLine := True;
	DrawGridLines := EXG2ANTTLib_TLB.exRowLines;
	Columns.Add('Q');
	with (IUnknown(Columns.Add('A')) as EXG2ANTTLib_TLB.Column) do
	begin
		Def[EXG2ANTTLib_TLB.exCellSingleLine] := OleVariant(False);
		with Editor do
		begin
			EditType := EXG2ANTTLib_TLB.MemoType;
			Appearance := EXG2ANTTLib_TLB.SingleApp;
		end;
	end;
	with Items do
	begin
		h1 := AddItem('What''s name?');
		CellValue[OleVariant(h1),OleVariant(1)] := 'This is my pet favorite long long long name, that shoul break the line in multiple pieces';
		h2 := AddItem('What''s your pet name?');
		CellValue[OleVariant(h2),OleVariant(1)] := 'This is my pet favorite long long long name, that shoul break the line in multiple pieces';
	end;
	EndUpdate();
end
1901
How can I get a row expanded / enlarged to fit the cell's text (individual cell)

with G2antt1 do
begin
	BeginUpdate();
	Chart.PaneWidth[True] := 0;
	ScrollBySingleLine := True;
	DrawGridLines := EXG2ANTTLib_TLB.exRowLines;
	Columns.Add('Q');
	Columns.Add('A');
	with Items do
	begin
		h1 := AddItem('What''s name?');
		CellValue[OleVariant(h1),OleVariant(1)] := 'This is my pet favorite long long long name, that shoul break the line in multiple pieces';
		h2 := AddItem('What''s your pet name?');
		with CellEditor[OleVariant(h2),OleVariant(1)] do
		begin
			EditType := EXG2ANTTLib_TLB.MemoType;
			Appearance := EXG2ANTTLib_TLB.SingleApp;
		end;
		CellValue[OleVariant(h2),OleVariant(1)] := 'This is my pet favorite long long long name, that shoul break the line in multiple pieces';
		CellSingleLine[OleVariant(h2),OleVariant(1)] := EXG2ANTTLib_TLB.exCaptionWordWrap;
	end;
	EndUpdate();
end